簡體   English   中英

Composer在Packagist之前使用Github

[英]Composer Use Github Before Packagist

我在這里做了一個FOSRestBundle 的分支RLovelett / FOSRestBundle它有一個分支dev-411 我想在Symfony2項目中使用FOSRestBundle的fork和branch。

為了嘗試這個,我修改了我的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.

我的配置有什么問題?

作曲家前綴dev-分支的名稱清楚地辨別出來,所以如果分支是dev-411 ,作曲家版本這將是dev-dev-411

試試這個: "friendsofsymfony/rest-bundle": "0.11.dev-feature/411"

更多信息: https//github.com/composer/composer/issues/935

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM