简体   繁体   English

与另一个捆绑软件捆绑在一起作为Symfony中的依赖项

[英]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 ? 我想知道是否有一种方法可以创建依赖于我的公共捆绑包OneupFlysystemBundle的可重用捆绑包?

By adding OneupFlysystemBundle to my bundle's composer.json I can see that it's downloaded and present in the vendor folder. 通过将OneupFlysystemBundle添加到我的捆绑包的composer.json中,我可以看到它已下载并存在于供应商文件夹中。

I want to only include my own bundle in the AppKernel (which has a dependency on OneupFlysystemBundle) 我只想在AppKernel中包含自己的捆绑包(该捆绑包依赖OneupFlysystemBundle)

除了这些解决方案之外,我结束了使用非捆绑(库)版本的OneupFlysystem作为捆绑软件的依赖关系,并将其重写为Facade

Probably the best way is to use Symfony Flex . 最好的方法可能是使用Symfony Flex Which allows you to use recipes. 允许您使用食谱。 An alternative would be to use symfony-bundle-dependencies 一种替代方法是使用symfony-bundle-dependencies

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM