[英]Composer Use Github Before Packagist
I have made a fork of FOSRestBundle here RLovelett/FOSRestBundle it has a branch dev-411
. 我在这里做了一个FOSRestBundle 的分支RLovelett / FOSRestBundle它有一个分支
dev-411
。 I want to use my fork and branch of FOSRestBundle in a Symfony2 project. 我想在Symfony2项目中使用FOSRestBundle的fork和branch。
To attempt this I patched my symfony2 project composer.json
like so (full composer.json
): 为了尝试这个,我修改了我的symfony2项目
composer.json
,如此(完整的composer.json
):
diff --git a/composer.json b/composer.json
index ec36007..19e82b5 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,7 @@
"jms/security-extra-bundle": "1.4.*",
"jms/di-extra-bundle": "1.3.*",
"jms/serializer-bundle": "0.12.x-dev",
- "friendsofsymfony/rest-bundle": "0.11.*"
+ "friendsofsymfony/rest-bundle": "dev-411"
},
"scripts": {
"post-install-cmd": [
@@ -42,12 +42,18 @@
"config": {
"bin-dir": "bin"
},
- "minimum-stability": "alpha",
+ "minimum-stability": "dev",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"branch-alias": {
"dev-master": "2.2-dev"
}
- }
+ },
+ "repositories": [
+ {
+ "type": "vcs",
+ "url": "https://github.com/RLovelett/FOSRestBundle"
+ }
+ ]
}
When I run composer update
I get the following error message: 当我运行
composer update
我收到以下错误消息:
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package friendsofsymfony/rest-bundle dev-411 could not be found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
What is wrong with my configuration? 我的配置有什么问题?
作曲家前缀dev-
分支的名称清楚地辨别出来,所以如果分支是dev-411
,作曲家版本这将是dev-dev-411
。
Try this : "friendsofsymfony/rest-bundle": "0.11.dev-feature/411"
试试这个:
"friendsofsymfony/rest-bundle": "0.11.dev-feature/411"
More infos here : https://github.com/composer/composer/issues/935 更多信息: https : //github.com/composer/composer/issues/935
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.