Repository navigation
Restore corrupted package metadata in composer.lock - #49
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
saarnilauri
left a comment
There was a problem hiding this comment.
Thanks! I checked this beyond the four entries in the description. I generated a fresh lock that pins all 45 packages to their exact locked versions and commits, then compared every entry field by field, including key order. On trunk, 5 entries differ; on this branch, only PHPCompatibility's time differs. That's expected for a dev-develop#<ref> constraint after develop has moved on. So the repair is complete and matches Composer's own output exactly.
composer install fails on trunk with the #48 error, and on this branch all 45 packages install and composer test / composer lint pass.
What?
Restores corrupted package metadata entries in
composer.lockso thatcomposer installsucceeds cleanly ontrunk.Fixes #48.
Why?
During a previous merge conflict resolution on
composer.lock(d8c3e53), fragments fromphpcompatibility/php-compatibilityandphpstan/phpstanwere inadvertently spliced into fourpackages-deventries:nyholm/psr7(1.8.2): Acquired"replace": { "wimg/php-compatibility": "*" }, a duplicate"require-dev"key,"default-branch": true,"type": "phpcodesniffer-standard", and"license": ["LGPL-3.0-or-later"]. Because bothnyholm/psr7andphpcompatibility/php-compatibilityclaimed to replacewimg/php-compatibility,composer installfailed with:phar-io/manifest(2.0.4): Acquired aphpcsstandards"require-dev"block and"type": "phpcodesniffer-standard"instead of"type": "library".php-http/discovery(1.20.0): Acquired"license": ["LGPL-3.0-or-later"]instead of"MIT".sebastian/global-state(5.0.8): Acquired"bin": ["phpstan", "phpstan.phar"]and a duplicate"type": "library"key.How?
Restores the canonical package metadata for those four locked packages in
composer.lockwithout churning unrelated dependency versions or altering the lockfilecontent-hash.Testing Instructions
composer validateand verify the lock file is valid.composer installand verify all 45 dev dependencies install without conflict.composer testandcomposer lint.