Skip to content

Commit fca7327

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

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@
1010
}
1111
],
1212
"require": {
13+
"chi-teck/drupal-code-generator": "4.0.0-alpha2 as 4.x-dev",
1314
"composer/installers": "^2.1",
1415
"cweagans/composer-patches": "^1.7",
15-
"drupal/core-composer-scaffold": "^11@alpha",
16-
"drupal/core-recommended": "^11@alpha",
16+
"drupal/core-composer-scaffold": "^11@beta",
17+
"drupal/core-recommended": "^11@beta",
1718
"drush/drush": "^13@beta",
1819
"oomphinc/composer-installers-extender": "^2.0",
1920
"vlucas/phpdotenv": "^5.1",
2021
"webflo/drupal-finder": "^1.2"
2122
},
2223
"require-dev": {
23-
"drupal/core-dev": "^11@alpha",
24+
"drupal/core-dev": "^11@beta",
2425
"ergebnis/composer-normalize": "^2.42"
2526
},
2627
"conflict": {
@@ -36,7 +37,7 @@
3637
"url": "https://asset-packagist.org"
3738
}
3839
],
39-
"minimum-stability": "dev",
40+
"minimum-stability": "alpha",
4041
"prefer-stable": true,
4142
"autoload": {
4243
"classmap": [

0 commit comments

Comments
 (0)