2013-03-27 37 views
3

我在这里做了FOSRestBundle的分叉RLovelett/FOSRestBundle it has a branch dev-411。我想在Symfony2项目中使用我的fork和FOSRestBundle的分支。作曲家使用Github Before Packagist

要尝试这个我修改我的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" 
+  } 
+ ] 
} 

当我运行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. 

什么是错的与我的配置?

回答

2

作曲家前缀dev-分支的名称清楚地辨别出来,所以如果分支是dev-411,作曲家版本这将是dev-dev-411

0

试试这个:"friendsofsymfony/rest-bundle": "0.11.dev-feature/411"

更多的相关信息在这里:https://github.com/composer/composer/issues/935

+0

尝试过你('0.11.dev-feature/411'),然后在阅读了一些问题后,我试了几次('dev-feature/411')。我甚至创建了这个名字的一个分支。没有骰子。同样的错误。 – Ryan 2013-03-27 16:22:27