Since admin_toolbar 8.x-2.* not any longer supported, I have to update to 3.*
Website runs on Ubuntu 20 Server, PHP 7.4
Drupal Version 8.9.18
Profile Commerce Base (commerce_base-)

$ composer require 'drupal/admin_toolbar:^3.0'
./composer.json has been updated
Running composer update drupal/admin_toolbar
> 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
- drupalcommerce/commerce_base is locked to version dev-8.x-1.x and an update of this package was not requested.
- drupalcommerce/commerce_base dev-8.x-1.x requires drupal/admin_toolbar ^2.0 -> found drupal/admin_toolbar[dev-2.x, 2.0.0-beta1, ..., 2.x-dev (alias of dev-2.x)] but it conflicts with your root composer.json require (^3.0).

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.

Comments

mmjvb’s picture

Obviously, you need to update drupalcommerce/commerce_base in order to update to 3.0 of drupal/admin_toolbar. The dev version you have now pins you to ^2.

composer require drupal/admin_toolbar "^3.0" --no-update
composer update drupalcommerce/commerce_base drupal/admin_toolbar

Obviously, this could report additional issues. There might be more packages to be updated due to changes in drupalcommerce/commerce_base. Either have composer report them or use -w or -W. Suggest --dry-run as well so you know what is going to happen.

georgk’s picture

Great. Thank you. No additional issues are reported. The update worked fine.

jabberwooki’s picture

Thanks a lot @mmjvb.
Separating requirement and update works perfectly.