Skip to content

Use a patch file to update the package in the result-cache-package-update e2e test#6095

Merged
staabm merged 1 commit into
phpstan:2.2.xfrom
SanderMuller:result-cache-e2e-patch
Jul 24, 2026
Merged

Use a patch file to update the package in the result-cache-package-update e2e test#6095
staabm merged 1 commit into
phpstan:2.2.xfrom
SanderMuller:result-cache-e2e-patch

Conversation

@SanderMuller

Copy link
Copy Markdown
Contributor

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-update now ships a local path-repo package (test/logger) and updates it with a committed updatePackage.patch that bumps its version, then composer update test/logger --no-cache re-mirrors it and changes its recorded reference in vendor/composer/installed.php. This replaces the inline php -r edit of installed.php and 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-lock keeps its jq content-hash change. Its composer.lock is gitignored and regenerated by composer 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. The jq does exactly that.

…date e2e test

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@staabm
staabm merged commit 6aaa8d1 into phpstan:2.2.x Jul 24, 2026
457 checks passed
@staabm

staabm commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants