From 6b8a886acd1d394852f64f4c0caa157e4d35f044 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. --- .github/workflows/ci.yml | 1 + README.md | 23 +++++++++++++++++++++++ composer.json | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c38ab803..f87659f19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,6 +77,7 @@ jobs: - name: Override Drupal version to dev for testing dev releases if: matrix.drupal-release == 'dev' run: | + composer config minimum-stability dev composer --verbose require --no-update drupal/core-recommended:10.0.x-dev composer --verbose require --no-update --dev drupal/core-dev:10.0.x-dev composer --verbose update 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": [