Repository navigation
Seed the PHPStan directory cache in cold test runs - #40
Merged
ChrisAbner merged 1 commit intoNov 25, 2026
Merged
Conversation
ChrisAbner
approved these changes
Nov 25, 2026
ChrisAbner
left a comment
Owner
There was a problem hiding this comment.
Thanks for picking this up, and sorry for the wait. I checked the seeded file against PHPStan's DirectoryWalker. It ignores a listings file without its format key and rewrites it, so the seed only removes the warning and never feeds PHPStan a stale listing. The suite passes cold with --fail-on-warning on PHP 8.4 and on 8.2 with --prefer-lowest, also on top of the upcoming 0.5.
Merged
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.
Initialize PHPStan’s test-only directory cache before the rule fixtures run. On a cold checkout, the first PHPStan class reads the cache before the file exists, which adds a recurring warning. Existing cache files and application settings are preserved. The test matrix now fails on warnings.
Closes #21.
On an exact clean checkout, the unmodified suite reported the missing directory-listings cache warning. With the patch and a fresh temporary directory, all 715 tests passed without warnings. Pint and PHPStan analysis also passed on PHP 8.5.
AI assisted with the change. I reproduced the warning and verified the cold-cache run locally.