parameters:
#    shop.example.class: Serge\ShopBundle\Example
    shop.category.repository.class: Serge\ShopBundle\Entity\CategoryRepository
    shop.category.entity.class: Serge\ShopBundle\Entity\Category

services:
#    shop.example:
#        class: %shop.example.class%
#        arguments: [@service_id, "plain_value", %parameter%]
    shop.twig.shop_extension:
        class: Serge\ShopBundle\Twig\ShopExtension
        tags:
            - { name: twig.extension }

    shop.category.repository:
        class: %shop.category.repository.class%
        factory_service: doctrine.orm.entity_manager
        factory_method:  getRepository
        arguments:
            - %shop.category.entity.class%
parameters:
#    shop.example.class: Serge\ShopBundle\Example
    shop.category.repository.class: Serge\ShopBundle\Entity\CategoryRepository
    shop.category.entity.class: Serge\ShopBundle\Entity\Category

    shop.product.repository.class: Serge\ShopBundle\Entity\ProductRepository
    shop.product.entity.class: Serge\ShopBundle\Entity\Product

    products.per.page: 10

services:
#    shop.example:
#        class: %shop.example.class%
#        arguments: [@service_id, "plain_value", %parameter%]
    shop.twig.shop_extension:
        class: Serge\ShopBundle\Twig\ShopExtension
        tags:
            - { name: twig.extension }

    shop.category.repository:
        class: %shop.category.repository.class%
        factory_service: doctrine.orm.entity_manager
        factory_method:  getRepository
        arguments:
            - %shop.category.entity.class%

    shop.product.repository:
            class: %shop.product.repository.class%
            factory_service: doctrine.orm.entity_manager
            factory_method:  getRepository
            arguments:
                - %shop.product.entity.class%
Set ProductRepository as a service && set product per page for pagination
Set ProductRepository as a service && set product per page for pagination
