-
Notifications
You must be signed in to change notification settings - Fork 103
Resolve entity metadata without objectManagerLoader #253
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
Conversation
7cc7192
to
750f5ab
Compare
750f5ab
to
d66fb1e
Compare
Does the https://github.com/phpstan/phpstan-doctrine#configuration doc should be updated then ? For instance to list features which still require the objectManagerLoader. |
670e28d ;) |
Thanks. I tried the master branch on my project and I have some issues that I don't have with my customObjectManager (cf #218).
Method Doctrine\ORM\EntityRepository<App\Document\LogDocument>::createQueryBuilder() invoked with 0 parameters, 1-2 required. Here the Repository should be considered as a
Call to an undefined method Doctrine\ORM\EntityRepository<App\Entity\Expedition>::getListOrders(). Weird thing, I only have the issue with the repository of the Expedition class... What can I do to help to debug this ? |
What's gonna help me here is: \PHPStan\dumpType($this->getDocumentManager());
\PHPStan\dumpType($this->getDocumentManager()->getRepository(LogDocument::class)); What's the actual output and what's the expected output? |
And about Expedition - where is the |
145 Dumped type: Doctrine\ODM\MongoDB\DocumentManager Expected type would be IMHO, it's the same issue that I was trying to solve in https://github.com/phpstan/phpstan-doctrine/pull/218/files#diff-2ffdfff3ded45d084e0d7d312fe16939835dba7dcad8fabc12a2c3ece495b46aR113-R124 Since I use both ORM and ODM, I shouldn't fallback on |
Yeah, this is definitely doable, I'm gonna fix it. |
is giving me
Expedition has the phpdoc
But I found that the issue is related to
Removing it fix my issue. Should I open an issue ? |
Yeah, definitely open an issue. |
This should be fine: f66919f Please note the new different ormRepositoryClass / odmRepositoryClass config parameters for setting base repository classes if you have one. |
Thanks, it does work for me. |
No description provided.