-
Notifications
You must be signed in to change notification settings - Fork 540
Fix tests #4339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests #4339
Conversation
…t causes whole test suite instability" This reverts commit 9ddddab804609ff34cc3917ff6839f6f2f370f55.
…accessors dutifully
if ($originalReflectionProvider !== null) { | ||
ReflectionProviderStaticAccessor::registerInstance($originalReflectionProvider); | ||
} | ||
if ($originalPhpVersion !== null) { | ||
PhpVersionStaticAccessor::registerInstance($originalPhpVersion); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as the code stands it looks like PhpVersionStaticAccessor::registerInstance()
might be called without also calling ReflectionProviderStaticAccessor::registerInstance
, which might mean PhpVersionStaticAccessor::registerInstance()
should also clear the cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm doing ObjectType::resetCaches only in ReflectionProvider accessor because that's what it depends on. I don't think there's any cache depending on PhpVersionStaticAccessor?
606c14b
to
5e15c44
Compare
nice! |
You were right about the PhpVersion, I just saw a failure that could be explained by that:
Gonna reset the caches in any case. Thanks! |
Awesome ! |
Closes phpstan/phpstan#13494