Problem/Motivation

The lock hash has got out-of-sync causing fails on PHP 7.3 testing on Drupal 9.4.x

Steps to reproduce

Run \Drupal\Tests\ComposerIntegrationTest::testComposerLockHash locally

Note this is not failing pHP 7.4 and greater because we change the lock file during testing because we update PHPUnit.

Proposed resolution

Fix the hash

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
680 bytes

Note this is only a problem on Drupal 9.4.x - everything else is fine.

To test you can run composer update --lock and see if the hash changes.

alexpott’s picture

See https://www.drupal.org/pift-ci-job/2280491 for an example of a HEAD test that is currently failing.

alexpott’s picture

mikelutz’s picture

Status: Needs review » Reviewed & tested by the community

Confirming that composer update --lock does change the lock file on 9.4 HEAD, but does not with this patch.

mike@MacBook-Pro-2 /Users/mike/Development/Drupal > git status
On branch 9.4.x
Your branch is up to date with 'origin/9.4.x'.

nothing to commit, working tree clean
mike@MacBook-Pro-2 /Users/mike/Development/Drupal > composer update --lock
> Drupal\Composer\Composer::ensureComposerVersion
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
Hardening vendor directory with .htaccess and web.config files.
55 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.
> Drupal\Composer\Composer::generateMetapackages
mike@MacBook-Pro-2 /Users/mike/Development/Drupal > git status
On branch 9.4.x
Your branch is up to date with 'origin/9.4.x'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   composer.lock

no changes added to commit (use "git add" and/or "git commit -a")
mike@MacBook-Pro-2 /Users/mike/Development/Drupal > 

mike@MacBook-Pro-2 /Users/mike/Development/Drupal > git stash
Saved working directory and index state WIP on 9.4.x: 61a44d1b1e Issue #3131348 by Spokje, jungle, mondrake, vsujeetkumar, sja112, kishor_kolekar, Hardik_Patel_12, mrinalini9, yogeshmpawar, daffie: Replace assertions involving calls to empty() with assertEmpty()/assertNotEmpty()/assertArrayNotHasKey()
mike@MacBook-Pro-2 /Users/mike/Development/Drupal > git checkout 3256451-Fix-composerlock-hash-on-Drupal-94
Switched to branch '3256451-Fix-composerlock-hash-on-Drupal-94'
mike@MacBook-Pro-2 /Users/mike/Development/Drupal > git status
On branch 3256451-Fix-composerlock-hash-on-Drupal-94
nothing to commit, working tree clean
mike@MacBook-Pro-2 /Users/mike/Development/Drupal > composer update --lock
> Drupal\Composer\Composer::ensureComposerVersion
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
Hardening vendor directory with .htaccess and web.config files.
55 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.
> Drupal\Composer\Composer::generateMetapackages
mike@MacBook-Pro-2 /Users/mike/Development/Drupal > git status
On branch 3256451-Fix-composerlock-hash-on-Drupal-94
nothing to commit, working tree clean
mike@MacBook-Pro-2 /Users/mike/Development/Drupal > 

  • catch committed b452010 on 9.4.x
    Issue #3256451 by alexpott, mikelutz: Fix composer.lock hash on Drupal 9...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed b452010 and pushed to 9.4.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.