Search code examples
phpsymfonybundle

Bundle with another bundle as a dependency in Symfony


I would like to know if there's a way to create a reusable bundle that depends on a public bundle in my case, OneupFlysystemBundle ?

By adding OneupFlysystemBundle to my bundle's composer.json I can see that it's downloaded and present in the vendor folder.

I want to only include my own bundle in the AppKernel (which has a dependency on OneupFlysystemBundle)


Solution

  • Probably the best way is to use Symfony Flex. Which allows you to use recipes. An alternative would be to use symfony-bundle-dependencies