Composer update to 10.2 does not register

Created on 17 December 2023, 6 months ago
Updated 30 April 2024, about 2 months ago

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...

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?

๐Ÿ’ฌ Support request
Status

Closed: works as designed

Version

10.2 โœจ

Component
Composerย  โ†’

Last updated about 20 hours ago

No maintainer
Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom SirClickALot Somerset

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @SirClickALot
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom SirClickALot Somerset
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia larowlan ๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ.au GMT+10

    Try clicking 'check manually'

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom SirClickALot Somerset

    @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.

  • ๐Ÿ‡ฉ๐Ÿ‡ฐ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 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.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen
  • 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 and aws/aws-sdk-php.

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

  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen

    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)
      [...]
      
    4. 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.

  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark ressa Copenhagen
  • ๐Ÿ‡บ๐Ÿ‡ธ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
  • ๐Ÿ‡ฌ๐Ÿ‡ง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 your composer.json ... then 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?

  • ๐Ÿ‡บ๐Ÿ‡ธ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
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada dadderley Vancouver

    thanks fkelly

  • ๐Ÿ‡ฉ๐Ÿ‡ฐ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.

    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

    โ€‹

Production build 0.69.0 2024