Use a patch file to update the package in the result-cache-package-update e2e test#6095
Merged
Merged
Conversation
…date e2e test Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #6086, as requested in review: converting the result-cache e2e tests to use a patch file instead of inline mutations.
result-cache-package-updatenow ships a local path-repo package (test/logger) and updates it with a committedupdatePackage.patchthat bumps its version, thencomposer update test/logger --no-cachere-mirrors it and changes its recorded reference invendor/composer/installed.php. This replaces the inlinephp -redit ofinstalled.phpand matches the patch-file style from #6088. I validated the full sequence locally: the cold run is clean, the reference changes on update, and the warm run still prints "Composer packages changed (test/logger); re-analysing only the files depending on them." and "Result cache restored. 1 file will be reanalysed."result-cache-composer-lockkeeps itsjqcontent-hash change. Itscomposer.lockis gitignored and regenerated bycomposer install(per the earlier review here), so there is no committed file for a patch to apply against, and the test's whole point is to flip only the lock's content-hash without touching any package. Thejqdoes exactly that.