1
У меня есть проблемы с зависимостями инъекций в Symfony3:Ошибка при введении доктрины и таможенной службы
Это мой services.yml
some_service:
class: StagingBundle\Service\SomeService
arguments: ['@doctrine']
arguments: ['@test.other_service']
Это конструктор SomeService.php
public function __construct($doctrine, SomeService $someService)
{
$this->doctrine=$doctrine;
$this->someService=$someService;
}
При запуске моей команды консоли появляется следующая ошибка:
[Symfony\Component\Debug\Exception\ContextErrorException]
Catchable Fatal Error: Argument 2 passed to stagingBundle\Service\SomeService::__construct() must be an instance of StagingBundle\Service\OtherService, none given, called in /var/www/projects/myApp/var/cache/dev/appDevDebugProjectContainer.php on line 1141 and defined
Почему это происходит и как я могу его решить?
Спасибо :) :) :) – Nathan