I see I can quieten the error by removing the docblock, but I need /** @var UserRepository */ to appease my IDE and for it to pick up methods from the repository.
It hasn't been giving an error without bleeding edge.
How can I work around this short of ignoring the error completely?
I'm not actually sure whether this is caused by phpstan itself or the Doctrine extension.
I'm looking at upgrading to v2.0 and just turned on bleeding edge. This has resulted in these errors being reported for Doctrine repositories.
The repository is defined like this:
And the error is triggered by this:
I see I can quieten the error by removing the docblock, but I need
/** @var UserRepository */
to appease my IDE and for it to pick up methods from the repository.It hasn't been giving an error without bleeding edge.
How can I work around this short of ignoring the error completely?
I'm not actually sure whether this is caused by phpstan itself or the Doctrine extension.
phpstan v1.12.11 phpstan-doctrine v1.5.6 phpstan/phpstan-symfony 1.4.12
Thanks!