I am wondering, how to manage dependencies of different branches using composer? For example the dev-master version of a bundle A needs the dev-master version of bundle B, but the dev-develop version of bundle A needs the dev-develop version of bundle B.
Asked
Active
Viewed 294 times
1
-
just update the `composer.json` file in your branches? – Wouter J Oct 30 '13 at 09:40
-
1I found the solution from the link below :) http://stackoverflow.com/questions/16329964/composer-and-multiple-branches – Burhan Oct 31 '13 at 09:52
1 Answers
2
This is pretty easy: Manage the contents of composer.json
and composer.lock
just like any other file. I.e. you define the dependencies of every branch independently of each other simply by your needs.
If you switch branches, a call to composer install
will install the needed dependencies of this branch. The elegant solution would be to add a build file with phing that would execute your tests, and prior to this install the correct dependencies.

Sven
- 69,403
- 10
- 107
- 109