-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Call to undefined method Doctrine\ORM\Query\Expr::myCustomMethod() #62
Comments
Hi, how are you able to use custom Expr class? Do you extend your QueryBuilder? Can you show me your |
It's used as helper class for building custom DQL parts. So, our EntityManager doesn't know about Thinking about adding |
Can you create a small sample repo? Still can't imagine how it works and why PHPStan fails on it. |
I prepared an example project |
Hi, I just commited a fix to master that solves this: 9fac3a7 With a few caveats:
Please follow these steps and tell me if it solves your problem and I can tag a new version. Thanks. |
This commit fixed my issue and thanks for caveats! |
Released as 0.11.4: https://github.com/phpstan/phpstan-doctrine/releases/tag/0.11.4 |
You no longer need the empty constructor, thanks to 0.11.9: https://github.com/phpstan/phpstan/releases/tag/0.11.9 (and this commit: phpstan/phpstan@5fc3a8d) |
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. |
I have custom Expr class extended from Doctrine\ORM\Query\Expr
I think, PHPStan doesn't know about that class and trigger error
is it because
Doctrine\ORM\Query\Expr
harcoded in getClass() method?How to fix that?
The text was updated successfully, but these errors were encountered: