Problem/Motivation
In version 2.1.1, this was added to basicshib.info.yml:
type: module
- core_version_requirement: ^11
+ core_version_requirement: ^10 || ^11
But, composer.json still has only D11:
"require": {
"drupal/core": "^11.0"
}
As a result, Composer will not allow an update if you're using Drupal 10.
Steps to reproduce
With a Drupal 10 site, try to use version 2.1:
$ composer require "drupal/basicshib:^2.1"
./composer.json has been updated
Running composer update drupal/basicshib
Gathering patches for root package.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/basicshib ^2.1 -> satisfiable by drupal/basicshib[2.1.0, 2.1.1, 2.x-dev (alias of dev-2.x)].
- drupal/basicshib[2.1.0, ..., 2.1.1] require drupal/core ^11.0 -> found drupal/core[11.0.0-alpha1, ..., 11.x-dev] but the package is fixed to 10.4.6 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/basicshib dev-2.x requires drupal/core ^8.8.0 || ^9.0 -> found drupal/core[8.8.0-alpha1, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but the package is fixed to 10.4.6 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- drupal/basicshib 2.x-dev is an alias of drupal/basicshib dev-2.x and thus requires it to be installed too.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Composer [require drupal/basicshib:^2.1] failed, composer command failed: exit status 2. stderr=
Proposed resolution
composer.json needs to be updated to have this:
"require": {
"drupal/core": "^10.0 || ^11.0"
}