Skysplit
Skysplit

Reputation: 1943

Checkout to another branch with different composer dependencies

So lately I've been developing composer package and I ran into following problem.

Branch 1.0 had composer dependency on somepackage: 1.0.0
Branch 2.0 had composer dependency on somepackage: 2.0.0

Is it possible to switch between these two branches without removing vendor directory and running composer update each time after git checkout {branch}? If so, how can I do this?

Upvotes: 1

Views: 794

Answers (1)

Alexander Guz
Alexander Guz

Reputation: 1364

As it is stated in the documentation, composer.lock is supposed to be committed to repository. I'm afraid you're trying to solve a problem, just because of wrong usage of composer.

Upvotes: 1

Related Questions