-
Notifications
You must be signed in to change notification settings - Fork 105
Doctrine QueryBulder typehint #5
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
Comments
Well, the type signature of On the project I'm currently on, we didn't mark the warning as ignored, but just explicitly cast the object to string, which calls the object's |
Yes, agreed, you should open a PR with Doctrine to update their phpDocs :) |
I was looking into doctrine docs and I think it's better to cast to string as @stesie mentioned. For doctrine it would require huge rework for phpdocs. I believe it will improve with new doctrine major version |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Level 5 gives me such warnings:
Parameter #4 $condition of method Doctrine\ORM\QueryBuilder::leftJoin() expects string|null, Doctrine\ORM\Query\Expr\Andx given
That happens when you dont use simple string conditions like this
->leftJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');
while joining but when using Expr builder instead. QueryBuilder's join functions document that argument as string|null but it also takes ExprDo you think I should mark this warning as ignored?
The text was updated successfully, but these errors were encountered: