-4

A site was upgraded from 10.1.7 to 10.1.8 instead to 10.2.2.

There were no errors along the upgrade process but from composer why-not drupal/core 10.2.2 it is indicated that my Drush version is too old.

drupal/core-recommended    10.1.8 requires         drupal/core (10.1.8)
drupal/core                10.2.2 conflicts        drush/drush (<12.4.3)
drupal/core                10.2.2 requires         symfony/console (^6.4)
drupal/recommended-project -      does not require symfony/console (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/dependency-injection (^6.4)
drupal/recommended-project -      does not require symfony/dependency-injection (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/event-dispatcher (^6.4)
drupal/recommended-project -      does not require symfony/event-dispatcher (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/http-foundation (^6.4)
drupal/recommended-project -      does not require symfony/http-foundation (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/http-kernel (^6.4)
drupal/recommended-project -      does not require symfony/http-kernel (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/mime (^6.4)
drupal/recommended-project -      does not require symfony/mime (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/routing (^6.4)
drupal/recommended-project -      does not require symfony/routing (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/serializer (^6.4)
drupal/recommended-project -      does not require symfony/serializer (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/validator (^6.4)
drupal/recommended-project -      does not require symfony/validator (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/process (^6.4)
drupal/recommended-project -      does not require symfony/process (but v6.3.12 is installed)
drupal/core                10.2.2 requires         symfony/yaml (^6.4)
drupal/recommended-project -      does not require symfony/yaml (but v6.3.12 is installed)
Not finding what you were looking for? Try calling `composer update "drupal/core:10.2.2" --dry-run` to get another view on the problem.

I was inclined in the comments to remove Drush, upgrade Drupal project, re-add Drush, and only then to try to update Drupal DB with Drush, but a shorter approach then removing and re-adding Drush would be to just update Drush.
I have always assumed that composer update on a Drupal project will also upgrade Drush due to the global nature of this command and because Drush is an add-on to the a Drupal project, but Drush isn't upgraded this way, so I ask here how to upgrade Drush?

0

1 Answer 1

0

According to the error message

drupal/core                10.2.2 conflicts        drush/drush (<12.4.3)

Drupal core 10.2.2 has defined a conflict with Drush <12.4.3. If you are still using Drush 11 update it first:

composer require 'drush/drush:^12.4' --no-update
composer update

The option --no-update in the first line only updates the composer.json file - the same as if you would have edited composer.json in a text editor - before the general composer update runs all updates in one step.

The reason Drush is not updated automatically is semantic versioning. A MAJOR version update can have API changes and therefore manual intervention is required. See https://semver.org/

If the update is still not working check the PHP version in the command line (php -v) and update composer itself:

composer self-update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.