Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#266] Set minimum-stability to stable and added docs. #667

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

matrix:
php-versions: ['8.3']
drupal-release: ['alpha', 'dev']
drupal-release: ['beta', 'dev']
composer-channel: ['stable', 'snapshot']

steps:
Expand Down 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
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"require": {
"composer/installers": "^2.1",
"cweagans/composer-patches": "^1.7",
"drupal/core-composer-scaffold": "^11@alpha",
"drupal/core-recommended": "^11@alpha",
"drupal/core-composer-scaffold": "^11@beta",
"drupal/core-recommended": "^11@beta",
"drush/drush": "^13@beta",
"oomphinc/composer-installers-extender": "^2.0",
"vlucas/phpdotenv": "^5.1",
"webflo/drupal-finder": "^1.2"
},
"require-dev": {
"drupal/core-dev": "^11@alpha",
"drupal/core-dev": "^11@beta",
"ergebnis/composer-normalize": "^2.42"
},
"conflict": {
Expand All @@ -36,7 +36,7 @@
"url": "https://asset-packagist.org"
}
],
"minimum-stability": "dev",
"minimum-stability": "alpha",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change.

"prefer-stable": true,
"autoload": {
"classmap": [
Expand Down
Loading