Repository navigation
Store PhpStorm stub paths of enum methods in the reflection cache relative to the stubs root - #6886
Open
jack-worman wants to merge 1 commit into
Open
jack-worman wants to merge 1 commit into
jack-worman wants to merge 1 commit into
Conversation
jack-worman
force-pushed
the
cache-enum-method-stub-paths
branch
2 times, most recently
from
October 30, 2026 12:37
4f36193 to
3a187d1
Compare
…ative to the stubs root
jack-worman
force-pushed
the
cache-enum-method-stub-paths
branch
from
October 30, 2026 17:16
3a187d1 to
8156563
Compare
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.
The reflection cache of PHP built-in classes stored the stub path relative to the phpstorm-stubs root only for the reflection itself; the methods an enum gets from the engine (
cases(),from(),tryFrom()) carry their own located source, which kept the absolute path. Loading such an enum from a cache filled by another installation (e.g. a cache directory shared between CI jobs checked out in different directories) crashed with"…/standard_10.stub" is not a file. Those paths are now stored relative too, and the cache key version is bumped because earlier releases sharing the cache would crash on the new entries' relative paths.Closes phpstan/phpstan#15607