When I do
composer install mmerian/doctrine-timestamp
composer
says
[InvalidArgumentException]
Could not find package mmerian/doctrine-timestamp at any version for your minimum-stability (stable). Check the pa
ckage spelling or your minimum-stability
But with this
composer install mmerian/doctrine-timestamp=dev-master
it works out. How composer
determines stability of a package? Can I make a version alpha by naming it alpha-master
?
UPD My question differs slightly from the one suggested. It's not only about marking code as stable. Not sure how to phrase my question better, but see the answer I expected:
composer
takes versions of a package from tags and branches. And most of the time it infers versions (unless specified explicitly, which is not recommended).
Versions taken from branches get stable
stability. The ones taken from tags get stability based on their suffix.
As such, when running composer install mmerian/doctrine-timestamp
with minimum-stability
stable
(which is the default), it can't find a stable version, since the only version as of yet is dev-master
. And fails.
When running composer install mmerian/doctrine-timestamp=dev-master
, the package implicitly gets (which I can't see in the docs) @dev
stability flag, which basically means minimum-stability = dev
for this particular package. Therefore it succeeds.