Answer the question
In order to leave comments, you need to log in
Including vendor bundle dependencies in Symfony2 automatically?
I created a vendor bundle. I posted it on packagist.org and on github. I am currently writing the installation instructions. And ran into a problem.
My bundle has a lot of dependencies (about 10). And when I just used my bundle in the project, I connected dependent bundles in app/AppKernel.php (all 10 pieces).
Now that the bundle is a vendor one, all its dependencies must also be connected in this way. Or can it be written somewhere in the bundle itself? Does it have something to do with DepandencyInjection?
Answer the question
In order to leave comments, you need to log in
There are two options.
Or pull dependencies at home, if these are libraries.
Or connect to AppKernel if these are bundles.
And since I "connected dependent bundles", then yes, everyone should be registered in the AppKernel.
A vivid example. SonataAdmin (Connection of bundles and painted AppKernel)
And DoctrineExtendion (Uses gedmo, but as a library, and not a line in AppKernel)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question