Answer the question
In order to leave comments, you need to log in
Similar to Laravel Service Provider for Symfony 4?
Hello everyone, is there an analogue of the Laravel Service Provider for Symfony 4, you need some place that will do some work when the framework is initialized and then it will be available to the entire project. I hope that I correctly described what I need. Thanks in advance
Answer the question
In order to leave comments, you need to log in
The direct analogue is container extension . For details see https://symfony.com/doc/current/components/depende...
The code for loading the extension should be placed in src/Kernel.php in the configureContainer method.
If I understand you correctly, you are looking for - https://symfony.com/doc/current/service_container/...
This tool allows you to build services as you need when initializing the bundle.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question