I have several packages under vendor
which are version-controlled with Git. The packages are registered at Packagist and are referenced in other packages or the main composer.json with version expressions like ~1.0
.
When I run composer update --prefer-source
, Composer leaves the Git-controlled packages alone and updates only all “external” dependencies, if available. This is expected behaviour.
However: When I create a tag of a package (which Packagist correctly treats as a new version), composer update --prefer-source
removes the Git-controlled package and installes a non-Gitted one.
How can I prevent Composer from replacing recently tagged packages during updates? Or is this a bug in Composer?