Я использую Symfony версии 3.4.8.
Конфигурация работает в Symfony 3.3, но в Symfony 3.4 я получаю:
Cannot autowire service "ProblemBundle\EntityManager\ProblemManager": argument "$paginator" of metho
d "__construct()" references interface "Knp\Component\Pager\PaginatorInterface" but no such service
exists. Did you create a class that implements this interface?
ProblemManager.php
public function (PaginatorInterface $page){}
приложение / Config / services.yml
# Learn more about services, parameters and containers at
# https://symfony.com/doc/current/service_container.html
parameters:
#parameter_name: value
services:
# default configuration for services in *this* file
_defaults:
# automatically injects dependencies in your services
autowire: true
# automatically registers your services as commands, event subscribers, etc.
autoconfigure: true
# this means you cannot fetch services directly from the container via $container->get()
# if you need to do this, you can override this setting on individual services
public: true
# makes classes in src/AppBundle available to be used as services
# this creates a service per class whose id is the fully-qualified class name
# add more services, or override services that need manual wiring
# AppBundle\Service\ExampleService:
# arguments:
# $someArgument: 'some_value'
UserBundle\Controller\:
resource: '../../src/UserBundle/Controller'
public: true
autowire: true
tags: ['controller.service_arguments']
UserBundle\EntityManager\UserManager:
autowire: true
ProblemBundle\EntityManager\ProblemManager:
autowire: true
public: true
Как настроить автопроводку для всех (включая сторонние комплекты)?