Skip to content

Commit 2b64fbc

Browse files
committed
[#266] Set minimum-stability to true and added docs.
1 parent c3959fd commit 2b64fbc

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
matrix:
2323
php-versions: ['8.3']
24-
drupal-release: ['alpha', 'dev']
24+
drupal-release: ['beta', 'dev']
2525
composer-channel: ['stable', 'snapshot']
2626

2727
steps:
@@ -72,6 +72,7 @@ jobs:
7272
- name: Override Drupal version to dev for testing dev releases
7373
if: matrix.drupal-release == 'dev'
7474
run: |
75+
composer config minimum-stability dev
7576
composer --verbose require --no-update drupal/core-recommended:11.0.x-dev
7677
composer --verbose require --no-update --dev drupal/core-dev:11.0.x-dev
7778
composer --verbose update

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,29 @@ cd some-dir
4747
composer require drupal/devel
4848
```
4949

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

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

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
"require": {
1313
"composer/installers": "^2.1",
1414
"cweagans/composer-patches": "^1.7",
15-
"drupal/core-composer-scaffold": "^11@alpha",
16-
"drupal/core-recommended": "^11@alpha",
15+
"drupal/core-composer-scaffold": "^11@beta",
16+
"drupal/core-recommended": "^11@beta",
1717
"drush/drush": "^13@beta",
1818
"oomphinc/composer-installers-extender": "^2.0",
1919
"vlucas/phpdotenv": "^5.1",
2020
"webflo/drupal-finder": "^1.2"
2121
},
2222
"require-dev": {
23-
"drupal/core-dev": "^11@alpha",
23+
"drupal/core-dev": "^11@beta",
2424
"ergebnis/composer-normalize": "^2.42"
2525
},
2626
"conflict": {
@@ -36,7 +36,7 @@
3636
"url": "https://asset-packagist.org"
3737
}
3838
],
39-
"minimum-stability": "dev",
39+
"minimum-stability": "alpha",
4040
"prefer-stable": true,
4141
"autoload": {
4242
"classmap": [

0 commit comments

Comments
 (0)