Problem/Motivation

I have done a routine update to my Drupal 10.1.17 > 10.2.0 using

composer update

As I do on a regular basis.

The result was...

Upgrading drupal/core-composer-scaffold (10.1.7 => 10.2.0)
Upgrading drupal/core-project-message (10.1.7 => 10.2.0)
Upgrading phenx/php-svg-lib (0.5.0 => 0.5.1)
Upgrading dompdf/dompdf (v2.0.3 => v2.0.4)
Upgrading nikic/php-parser (v4.17.1 => v4.18.0)

But my site is still reporting...

drupal-10.2-update-not-registering

I have performed the same update on three Drupal sites and the result is the same.
ALL site are still working fine despite the failures to register the updates.

Any suggestions?

Issue fork drupal-3409278

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

SirClickalot created an issue. See original summary.

sirclickalot’s picture

Issue summary: View changes
larowlan’s picture

Try clicking 'check manually'

sirclickalot’s picture

@larowlan,

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.

ressa’s picture

Issue summary: View changes

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 and drupal/core-project-message was updated to 10.2 but drupal/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.

cilefen’s picture

Category: Bug report » Support request
mr.white’s picture

I saw this issue when updating yesterday as well. The packages which were not getting updated automatically (and were blocking the Drupal update) were drush/drush and aws/aws-sdk-php.

Updating these two items explicitly allowed the normal Drupal update to proceed as expected.

ressa’s picture

Thanks @jabeler, your comment made me pursue the Drush clue.

  1. 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
    
  2. 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"
    },
    
  3. 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.

ressa’s picture

fkelly12054@gmail.com’s picture

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.

longwave’s picture

Status: Active » Closed (works as designed)

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.

ressa’s picture

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 your composer.json, just running composer 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?

matt_zimo’s picture

Thanks fkelly12054 !

I needed to update drush first in composer, then run the core and drush updates at the same time

leewbutler made their first commit to this issue’s fork.

leewbutler’s picture

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;
dadderley’s picture

thanks fkelly

ressa’s picture

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.

renat’s picture

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.

ccolumbie’s picture

The #16 it's the only one that worked for me. Thanks leewbutler!!!

ellenjones123’s picture

#16 did the trick. Surprised this was so complex.

ressa’s picture

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?

goose2000’s picture

#11 got me into the promised land, this was not fun, but thanks @fun.fkelly12054@gmail.com

arunkumark’s picture

​I solved the issue by updating the Drush separately and updating the Drupal core.

  1. Update the Drush independently composer require 'drush/drush:^12.4.3' --with-all-dependencies
  2. 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
  3. Run the Drush update drush updb