- Issue created by @SirClickALot
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
Try clicking 'check manually'
- ๐ฌ๐งUnited Kingdom SirClickALot Somerset
That was the very firs thing I tried; the result is the same on all three of my D10 sites, the update is not recognised to have taken place although according to Composer and mu Git log is clearly has been on all three sites.
- ๐ฉ๐ฐDenmark ressa Copenhagen
Please share the complete actual update command, and resulting message. I ask for this, because I saw something similar yesterday with the recommended update command for Drupal 10.2:
composer update "drupal/core-*" --with-all-dependencies
From https://www.drupal.org/project/drupal/releases/10.2.0 โ
After this,
drupal/core-composer-scaffold
anddrupal/core-project-message
was updated to 10.2 butdrupal/core-recommended
stayed at 10.1.7 ...First please check what you get with this command (the one I used to see that some packages were updated, others not):
composer outdated "drupal/*"
Then perhaps try clearing the Composer cache, and run the update command again, and see if that helps?
composer clear-cache
Alternatively, this may work
composer update [<package-name>] --no-cache
If this is a general problem which many people encounter (and it takes care of the problem) we may need to add
composer clear-cache
to the recommended method of updating Drupal.PS. I ended up running
composer update
yesterday, but that updates everything, and I wish I had tried cache-clearing first. I saw this issue when updating yesterday as well. The packages which were not getting updating automatically (and were blocking the Drupal update) were
drush/drush
andaws/aws-sdk-php
.Updating these two items explicitly allowed the normal Drupal update to proceed as expected.
- ๐จ๐ฆCanada Charlie ChX Negyesi ๐Canada
- ๐ฉ๐ฐDenmark ressa Copenhagen
Thanks @jabeler, your comment made me pursue the Drush clue.
- I created a fresh composer.json with this:
composer create-project drupal/recommended-project:10.1 cd recommended-project/ composer require drush/drush:12.3
- Edited composer.json to this:
"require": { "composer/installers": "^2.0", "drupal/core-composer-scaffold": "^10.1", "drupal/core-project-message": "^10.1", "drupal/core-recommended": "^10.1", "drush/drush": "^12" },
- Ran composer update
Doesn't work, without Drush
$ composer update "drupal/core-*" --with-all-dependencies --dry-run Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 30 updates, 0 removals - Upgrading doctrine/deprecations (v1.1.1 => 1.1.2) - Upgrading drupal/core (10.1.0 => 10.1.7) - Upgrading drupal/core-composer-scaffold (10.1.0 => 10.2.0) - Upgrading drupal/core-project-message (10.1.0 => 10.2.0) - Upgrading drupal/core-recommended (10.1.0 => 10.1.7) [...]
-
Include Drush, and it updates to 10.2
$ composer update "drupal/core-*" drush/drush --with-all-dependencies --dry-run Loading composer repositories with package information Updating dependencies Lock file operations: 1 install, 47 updates, 0 removals - Upgrading asm89/stack-cors (v2.1.1 => v2.2.0) - Upgrading chi-teck/drupal-code-generator (3.1.0 => 3.3.0) - Upgrading composer/semver (3.3.2 => 3.4.0) - Upgrading doctrine/deprecations (v1.1.1 => 1.1.2) - Upgrading drupal/core (10.1.0 => 10.2.0) - Upgrading drupal/core-composer-scaffold (10.1.0 => 10.2.0) - Upgrading drupal/core-project-message (10.1.0 => 10.2.0) - Upgrading drupal/core-recommended (10.1.0 => 10.2.0) - Upgrading drush/drush (12.3.0 => 12.4.3) [...]
I now actually see this on the Drupal 10.2 release page โ :
Drush versions below 12.4.3 are incompatible with Drupal 10.2.x
Users of Drush will need to upgrade to version 12.4.3 or greater.
- I created a fresh composer.json with this:
- ๐ฉ๐ฐDenmark ressa Copenhagen
Adding
drush/drush
seems to be the solution: https://www.drupal.org/forum/support/upgrading-drupal/2023-12-16/new-upd... โ - ๐บ๐ธUnited States fkelly
Thanks!! @ressa for number 9. After running through all the steps in this thread, my core version was still refusing to update from 10.1.7. Prohibits was not really telling me anything. Then I realized I might need to run:
composer require drush/drush:^12.4.3
all by its lonely self. That worked. Then I could run:
composer update "drupal/core-*" drush/drush --with-all-dependencies
all by its lonely self and my core version would update. Too bad the instructions for updating Drush could not have been integrated into the core update instructions for 10.2 a little more tightly.
- Status changed to Closed: works as designed
6 months ago 9:46am 18 December 2023 - ๐ฌ๐งUnited Kingdom longwave UK
Thanks for getting back to us, marking "works as designed" - hopefully your comment will help others in the same situation. We did try to make this clear in the release notes, for future similar requirements we will see if we can make it even clearer.
- ๐ฉ๐ฐDenmark ressa Copenhagen
You're welcome @fkelly12054! Thanks for confirming that this solves the problem for you.
About updating Drush, was it pinned to an old version in your composer.json? Because you shouldn't have to
require
it again, if for example it said"drush/drush": "^12.1"
in yourcomposer.json
... thencomposer update drush/drush
should allow it to update to 12.4.3.By the way, I separated out Drush in the update process on https://www.drupal.org/docs/updating-drupal/updating-drupal-core-via-com... โ after a comment from @jaypan, to make Drush's role clearer.
Congratulation with getting promoted to release manager @longwave :)
The Drush requirement was included in the Release notes at https://www.drupal.org/project/drupal/releases/10.2.0#drush โ after all, but not in the blog post https://www.drupal.org/blog/drupal-10-2-0 โ ...
Such blog posts are of course mostly about showcasing new improvements (and they're great!) but I think you should consider including a note about the Drush 12.4.3 requirement. I think it might help some have an easier update experience.
Also, maybe @Gรกbor Hojtsy or someone else on Planet Drupal can create a short, quick blog post about this, to alert the Drupal community about it? Maybe a tweet is also worth considering?
- ๐บ๐ธUnited States matt_zimo
Thanks fkelly12054 !
I needed to update drush first in composer, then run the core and drush updates at the same time
- First commit to issue fork.
- ๐บ๐ธUnited States leewbutler
Updating Drush first also worked for me, but at first I could not update Drush because of a "chicken-and-egg" dependency issue. The fix is to use the "--no-update" flag with a series of composer updates, like so...
composer require drush/drush:^12.4.3 --no-update composer require 'drupal/core-recommended:^10.2.0' --update-with-dependencies --no-update composer update
- ๐ฉ๐ฐDenmark ressa Copenhagen
Another method shared by @jaypan is simply to remove Drush before updating Drupal, and add Drush again afterwards.
It would be interesting to hear if Drush in your
composer.json
's was pinned at for example Drush 12.1, which would block Drupal from updating. Was really surprised (no) to see this issue classified as "support request" and "closed (works as designed)", while Composer command, proposed at release page:
composer update "drupal/core-*" --with-all-dependencies
actually fails, and fails silently, with such an output, that looks perfectly normal:composer update "drupal/core-*" --with-all-dependencies Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 4 updates, 0 removals - Upgrading drupal/core-composer-scaffold (10.1.7 => 10.2.0) - Upgrading drupal/core-project-message (10.1.7 => 10.2.0) - Upgrading symfony/filesystem (v6.2.7 => v6.4.0) - Upgrading symfony/finder (v6.2.7 => v6.4.0) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 0 installs, 4 updates, 0 removals - Downloading drupal/core-composer-scaffold (10.2.0) - Downloading drupal/core-project-message (10.2.0) - Downloading symfony/finder (v6.4.0) - Downloading symfony/filesystem (v6.4.0) - Upgrading drupal/core-composer-scaffold (10.1.7 => 10.2.0): Extracting archive - Upgrading drupal/core-project-message (10.1.7 => 10.2.0): Extracting archive - Upgrading symfony/finder (v6.2.7 => v6.4.0): Extracting archive - Upgrading symfony/filesystem (v6.2.7 => v6.4.0): Extracting archive Generating autoload files 44 packages you are using are looking for funding. Use the `composer fund` command to find out more! No security vulnerability advisories found
You have to either notice, that too few packages were actually updated, or to go to
admin/reports/updates
page to find out, that upgrade failed.Obviously many users would never read "Drush versions below 12.4.3 are incompatible with Drupal 10.2.x" statement, placed after "Upgrading from Drupal 6 and 7", and/or would not understand, what should they actually do, which will leave them with half-upgraded sites.
- ๐จ๐บCuba ccolumbie
The #16 it's the only one that worked for me. Thanks leewbutler!!!
- ๐บ๐ธUnited States ellenjones123 Huntsville, AL (employer) / Kelso, TN (remote work)
#16 did the trick. Surprised this was so complex.
- ๐ฉ๐ฐDenmark ressa Copenhagen
Removing Drush before updating Drupal, and adding Drush again afterwards is probably the easiest method.
Still it would be great to understand why this happens. Is it because Drush was pinned to for example 12.2 or even Drush 11 in your
composer.json
's? - ๐บ๐ธUnited States goose2000
#11 got me into the promised land, this was not fun, but thanks @fun.fkelly12054@gmail.com
- ๐ฎ๐ณIndia arunkumark Coimbatore
โI solved the issue by updating the Drush separately and updating the Drupal core.
- Update the Drush independently
composer require 'drush/drush:^12.4.3' --with-all-dependencies
- Add the Drupal core version to the composer
composer remove drupal/core-recommended --no-update composer require drupal/core-recommended:^10.2 --no-update composer install
- Run the Drush update
drush updb
โ
- Update the Drush independently