Skip to content

Commit a44a38e

Browse files
committed
[#266] Set minimum-stability to true and added docs.
1 parent 4013e3f commit a44a38e

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
- name: Override Drupal version to dev for testing dev releases
7878
if: matrix.drupal-release == 'dev'
7979
run: |
80+
composer config minimum-stability dev
8081
composer --verbose require --no-update drupal/core-recommended:10.0.x-dev
8182
composer --verbose require --no-update --dev drupal/core-dev:10.0.x-dev
8283
composer --verbose update

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,29 @@ cd some-dir
5050
composer require drupal/devel
5151
```
5252

53+
By default, this project is set to install only stable releases of dependencies,
54+
as specified by `"minimum-stability": "stable"` in `composer.json`. If you need
55+
to use non-stable releases (e.g., `alpha`, `beta`, `RC`), you can modify the
56+
version constraint to allow for such versions. For instance, to require a beta
57+
version of a module:
58+
59+
```bash
60+
composer require drupal/devel:1.0.0-beta1
61+
```
62+
63+
Alternatively, you can globally adjust the stability settings by modifying
64+
`composer.json` to include the desired stability level and explicitly allow it:
65+
66+
```json
67+
{
68+
"minimum-stability": "beta",
69+
"prefer-stable": true
70+
}
71+
```
72+
73+
This configuration ensures that stable releases are preferred, but allows the
74+
installation of non-stable packages when necessary.
75+
5376
### Adding libraries
5477

5578
You can manage front-end asset libraries with Composer thanks to the

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"url": "https://asset-packagist.org"
3737
}
3838
],
39-
"minimum-stability": "dev",
39+
"minimum-stability": "stable",
4040
"prefer-stable": true,
4141
"autoload": {
4242
"classmap": [

0 commit comments

Comments
 (0)