From 20a24d415bad98c75f25e26abaafa5e081032072 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 17 May 2024 16:48:53 +1000 Subject: [PATCH] [#266] Set `minimum-stability` to `true` and added docs. --- README.md | 23 +++++++++++++++++++++++ composer.json | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 86fb96aac..2677db962 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,29 @@ cd some-dir composer require drupal/devel ``` +By default, this project is set to install only stable releases of dependencies, +as specified by `"minimum-stability": "stable"` in `composer.json`. If you need +to use non-stable releases (e.g., `alpha`, `beta`, `RC`), you can modify the +version constraint to allow for such versions. For instance, to require a beta +version of a module: + +```bash +composer require drupal/devel:1.0.0-beta1 +``` + +Alternatively, you can globally adjust the stability settings by modifying +`composer.json` to include the desired stability level and explicitly allow it: + +```json +{ + "minimum-stability": "beta", + "prefer-stable": true +} +``` + +This configuration ensures that stable releases are preferred, but allows the +installation of non-stable packages when necessary. + ### Adding libraries You can manage front-end asset libraries with Composer thanks to the diff --git a/composer.json b/composer.json index d7e5ec803..88c967cf2 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "url": "https://asset-packagist.org" } ], - "minimum-stability": "dev", + "minimum-stability": "stable", "prefer-stable": true, "autoload": { "classmap": [