Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 66 Pomógł: 0 Dołączył: 24.08.2017 Ostrzeżenie: (0%)
|
Próbuje wstrzyknąć obiekt do service ale niestety wyskakuje mi błąd: Cannot autowire service ... but no such service exists :
"Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\AutowiringFailedException' with message 'Cannot autowire service "AppBundle\Service\ValidResponse": argument "$filter" of method "__construct()" references class "Symfony\Component\HttpKernel\Event\FilterResponseEvent" but no such service exists. It cannot be auto-registered because it is from a different root namespace.' in C:\xampp\htdocs\heroku\testsymf\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\AutowirePass.php:285 Stack trace: #0 C:\xampp\htdocs\heroku\testsymf\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\AutowirePass.php(217): Symfony\Component\DependencyInjection\Compiler\AutowirePass->autowireMethod(Object(ReflectionMethod), Array) #1 C:\xampp\htdocs\heroku\testsymf\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\AutowirePass.php(140): Symfony\Component\DependencyInjection\Compiler\AutowirePass->autowireCalls(Object(ReflectionClass), Array, Array) #2 in C:\xampp\htdocs\heroku\testsymf\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\AutowirePass.php on line 285"
|
|
|
|
symer [Symfony2][Symfony][SF]Cannot autowire service/but no such service exists 5.07.2018, 18:24:53
Pilsener A jaki efekt chcesz uzyskać? Eventów nie używa się... 6.07.2018, 11:54:42
symer Ok. Ale jak Chce wskrzyknąć inny obiekt , który ni... 7.07.2018, 17:52:52
Pilsener CytatAle jak Chce wskrzyknąć inny obiekt , który n... 7.07.2018, 22:20:03
symer NO właśnie o to mi chodzi, że ten obiekt response ... 8.07.2018, 07:34:08 ![]() ![]() |
|
Aktualny czas: 24.12.2025 - 13:22 |