symfony – 如何在Bundle中正确声明对另一个Bundle的依赖?
发布时间:2020-12-14 04:56:21 所属栏目:百科 来源:网络整理
导读:我试图在Bundle中使用Bundle但不知何故它是failig. "repositories": [ { "type": "vcs","url": "https://github.com/myname/mybundle" }],"require": { "php": "=5.3.3","symfony/symfony": "2.1.*",(...) "myname/mybundle": "*"}, 这似乎到目前为止工作.但
我试图在Bundle中使用Bundle但不知何故它是failig.
"repositories": [ { "type": "vcs","url": "https://github.com/myname/mybundle" } ],"require": { "php": ">=5.3.3","symfony/symfony": "2.1.*",(...) "myname/mybundle": "*" }, 这似乎到目前为止工作.但我无法弄清楚如何在“myname / mybundle”中声明另一个依赖项. 我在myname / mybundle的composer.json文件中尝试了以下内容,但没有一个工作:( "repositories": [ { "type": "vcs","url": "url": "https://github.com/drymek/PheanstalkBundle" } ],"require": { (...) "drymek/PheanstalkBundle": "dev-master" } 和 "repositories": [ { "type": "package","package": { "name": "drymek/PheanstalkBundle","version": "dev-master","source": { "url": "https://github.com/drymek/PheanstalkBundle.git","type": "git","reference": "master" } } } ],"require": { (...) "drymek/PheanstalkBundle": "dev-master" } 当我朗读composer.phar更新我得到的全部是 – myname / mybundle dev-master需要drymek / pheanstalkbundle dev-master – >找不到匹配的包. 解决方法
好的,我找到了答案
here
它指出:存储库不会递归解析.您只能将它们添加到主composer.json中.依赖项’composer.jsons的存储库声明被忽略. 那太糟糕了……但现在至少我知道在哪里放置我的依赖(在根composer.json文件中) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |