Skip to content

Comments

Assert ExprCacheHelper->import() will not mix up same expr-string based attributes#5023

Merged
ondrejmirtes merged 3 commits intophpstan:2.1.xfrom
staabm:test-parser-cache
Feb 22, 2026
Merged

Assert ExprCacheHelper->import() will not mix up same expr-string based attributes#5023
ondrejmirtes merged 3 commits intophpstan:2.1.xfrom
staabm:test-parser-cache

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Feb 22, 2026

test when attributes which represent the same value expression don't inherit data from a previous call to ExprCacheHelper::import() because of a poisened cache in the underlying CachedParser.

this test makes sure we don't regress after starting to re-use the CachedParser in ondrejmirtes/BetterReflection#41.

with this PR in place, we can be sure that we don't get back the bug which was fixed by ondrejmirtes/BetterReflection@e124747 when reverting said commit.

@staabm staabm marked this pull request as ready for review February 22, 2026 11:02
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit f018b6e into phpstan:2.1.x Feb 22, 2026
372 checks passed
@ondrejmirtes
Copy link
Member

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.

3 participants