1

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.

Wouter J
  • 41,455
  • 15
  • 107
  • 112
Burhan
  • 93
  • 7

1 Answers1

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