Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to mark code as stable using Composer?

I've recently come across the change in composer meaning that the default minimum-stability is stable, and rather than set this to dev I'd like to mark some of my libraries as stable.

I actually use two relevant branches, release and dev branched from master. Every so often something is merged into release and tagged as new version.

How does composer determine the stability of my libraries, is there a naming convention for branches, version nums, a key in composer.json?

Thanks

like image 265
Adam Avatar asked Jul 25 '12 13:07

Adam


People also ask

What is minimum stability in Composer?

An alternative is to set your minimum-stability to dev, but tell composer you want to use stable whenever possible: "minimum-stability": "dev", "prefer-stable" : true. This basically means it will always use stable UNLESS there is no way to install a stable dependency, and therefore use dev.

What is Classmap in Composer?

Classmap# The classmap references are all combined, during install/update, into a single key => value array which may be found in the generated file vendor/composer/autoload_classmap. php . This map is built by scanning for classes in all .

How do I use Composer json file?

To configure Composer for your PHP app json file specifies required packages. Verify that a composer. json file is present in the root of your git repository. Run composer install (on your local machine) to install the required packages and generate a composer.


1 Answers

The answer is: Tags. Your may also use Alias, if you don't want to use tags. But it's worth to mention, that you should only mark your packages as stable, when they are stable and not to make others believe they are.

Update: One more link: Stability

like image 138
KingCrunch Avatar answered Sep 20 '22 17:09

KingCrunch