3

I have made a fork of FOSRestBundle here RLovelett/FOSRestBundle it has a branch dev-411. I want to use my fork and branch of FOSRestBundle in a Symfony2 project.

To attempt this I patched my symfony2 project composer.json like so (full 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:

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?

Ryan
  • 6,432
  • 7
  • 40
  • 54

2 Answers2

2

Composer prefixes dev- to branch names to identify them clearly, so if the branch is dev-411, the composer version for it would be dev-dev-411.

Seldaek
  • 40,986
  • 9
  • 97
  • 77
0

Try this : "friendsofsymfony/rest-bundle": "0.11.dev-feature/411"

More infos here : https://github.com/composer/composer/issues/935

Romibuzi
  • 184
  • 7
  • Tried yours (`0.11.dev-feature/411`) and then after reading the issues I tried a couple more (`dev-feature/411`). I even created a branch of that name. No dice. Same error. – Ryan Mar 27 '13 at 16:22