Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change minimum stability for just one package in Composer

I'm trying to incorporate the ldap-auth module into my Laravel project via Composer. However, it is only available in a dev stability version. My current Composer.json has a minimum-stability set to stable, which I'd like to keep for the rest of my modules, but when I try to run composer update, it gives an error that there is a module that does not meet the minimum stability requirements. Is there a way to install that package separately with its own minimum-stability requirement?

like image 291
cchapman Avatar asked Jan 30 '15 16:01

cchapman


People also ask

What is minimum stability?

Stability resolution Determine minimum-stability : In this case the field is not defined, so it is set to the default value, which is “stable”. It sees that A has a constraint for version dev-master . Due to the dev- prefix, this is known to be a dev version, and dev versions have “dev” stability.

What is a Composer Metapackage?

metapackage: An empty package that contains requirements and will trigger their installation, but contains no files and will not write anything to the filesystem. composer-plugin: A package of type composer-plugin may provide an installer for other packages that have a custom type.

What is require Dev in Composer?

The package will not be installed unless those requirements can be met. require-dev (root-only) Lists packages required for developing this package (1), or running tests, etc. The dev requirements of the root package only will be installed if install is run with --dev or if update is run without --no-dev .


1 Answers

There is, you'll just need to whitelist that package with a stability flag. Something like this:

{
"require": {
   "ccovey/ldap-auth": "1.1.*@dev",
}}

Composer Stability Flags

like image 132
Zach Biles Avatar answered Oct 10 '22 18:10

Zach Biles