-
Notifications
You must be signed in to change notification settings - Fork 96
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
order of QueryBuilder::select arguments is not preserved in QueryBuilder::getResult #482
Comments
Hi @CircleCode, it better start with how the Query is templated You can try
You'll get something like `Query<array-key, SearchCustomization | LocalizationDetail> To support keeping shape, I think we need a Query shape like we have array shape
calls and the simplification made by the typeBuilder here |
According to
phpstan-doctrine/src/Type/Doctrine/Query/QueryResultDynamicReturnTypeExtension.php
Lines 117 to 127 in 90e60ba
QueryBuilder::getResult
returns an array withh all returned types, and does not preserve order.As an example, we had this code:
and phpstan complained that
so we had to write this to help phpstan understand:
The text was updated successfully, but these errors were encountered: