Questions tagged [symfony-dependency-injection]
35 questions
0
votes
1 answer
Symfony 4 autowiring argument not working
I'm trying to autowire the UrlGeneratorInterface into a DTO to use the generate method in my DTO,
I have this in my DTO:
namespace App\DTO;
use JMS\Serializer\Annotation as Serializer;
use JMS\Serializer\Annotation\ExclusionPolicy;
use…

Nikoala
- 71
- 1
- 10
0
votes
1 answer
Symfony compile annotated classes
I'm interested in Symfony\Component\HttpKernel\DependencyInjection\Extension::getAnnotatedClassesToCompile() method. If I understand it correctly, you can addAnnotatedClassesToCompile() an array of classes (which uses annotations) namespaces. Then…

rokas
- 1,521
- 9
- 16
0
votes
0 answers
Symfony's Dependency Injection module, ServiceDefinitions are not loaded at the moment of using an Extension
As per the examples, I'm doing the right thing.
However, definitions are empty.
These are my settings:
services:
form_manager:
public: true
alias: BI\GRV\Application\Services\FormManager\FormManager
integration_layer_client:
…

JorgeeFG
- 5,651
- 12
- 59
- 92
-1
votes
2 answers
The > "Symfony\Component\DependencyInjection\ContainerInterface" autowiring > alias is deprecated. How eliminate it on symfony 5.1?
I am migrating an application from Symfony 4.4 to Symfony 5.4. In the case of forms, I have a form that I pass in the constructor a variable ContainerInterface $container to use a parameter in the configuration of a widget. In version 5.4 this gives…

Francisco
- 194
- 2
- 9
-2
votes
1 answer
Uncaught Error: Class 'Symfony\Component\Config\Resource\ClassExistenceResource' not found
I added the Symfony Dependency injection container (composer require symfony/dependency-injection): https://symfony.com/doc/current/components/dependency_injection.html
Run the: composer dump-autoload -o to reorganize classes…

Imnotapotato
- 5,308
- 13
- 80
- 147