Skip to content
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

QueryBuilderGetQueryDynamicReturnTypeExtension: handle regular set usages #498

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

janedbal
Copy link
Contributor

No description provided.

return $defaultReturnType;
}
if (count($args) === 1) {
$queryBuilder->set($args[0], $args[0]);
Copy link
Member

Choose a reason for hiding this comment

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

This branch does not seem to be tested

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is. This is the main thing that enables the whole thing. Maybe you missed array_slice above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea here is to drop second argument (which is typically an expression) and do "dummy update" alias.field = alias.field instead.

Copy link
Member

Choose a reason for hiding this comment

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

Oh alright, I know less and less about this extension every day :D

@ondrejmirtes ondrejmirtes merged commit 85def57 into phpstan:1.3.x Nov 21, 2023
24 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.

2 participants