Skip to content

Infer QueryBuilderType for any method returning QueryBuilder: revive with cache #518

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

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

janedbal
Copy link
Contributor

$fileName = $methodReflection->getDeclaringClass()->getFileName();
if ($fileName === null) {
return [];
}

if (isset($this->cache[$fileName][$methodName])) {
return $this->cache[$fileName][$methodName];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: if this gets proven to help, we should improve the cache key to support multiple classes with the same method name in the same file.

@ondrejmirtes ondrejmirtes merged commit 2ca2c7a into phpstan:1.3.x Jan 17, 2024
@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.

2 participants