Home » Php » php – How to change minimum stability for just one package in Composer

php – How to change minimum stability for just one package in Composer

Posted by: admin July 12, 2020 Leave a comment

Questions:

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?

How to&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