Skip to content

Commit

Permalink
[#266] Set minimum-stability to true and added docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed May 17, 2024
1 parent c3959fd commit c0ac5e8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,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:11.0.x-dev
composer --verbose require --no-update --dev drupal/core-dev:11.0.x-dev
composer --verbose update
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,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
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
}
],
"require": {
"chi-teck/drupal-code-generator": "4.x-dev#e61b917 as 3.5.0",
"composer/installers": "^2.1",
"cweagans/composer-patches": "^1.7",
"drupal/core-composer-scaffold": "^11@alpha",
Expand All @@ -36,7 +37,7 @@
"url": "https://asset-packagist.org"
}
],
"minimum-stability": "dev",
"minimum-stability": "alpha",
"prefer-stable": true,
"autoload": {
"classmap": [
Expand Down

0 comments on commit c0ac5e8

Please sign in to comment.