-
Notifications
You must be signed in to change notification settings - Fork 231
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
Registry constructor expected ManagerRegistry found DocumentManager #781
Comments
@mustanggb any chance you could provide us a PR with a failing test case? At a glance there seems to be a misconfiguration on your end, as per the error the repository is expecting an instance of |
Okay I think I found the source:
I also tried However changing to Could this be related to some of these: |
Ah so this is static analysis error! Whatever you're using seems to be taking PHPDoc from ODM's definition https://github.com/doctrine/mongodb-odm/blob/d3c8966b95059e9b572b3f873440b93ac7dd3907/lib/Doctrine/ODM/MongoDB/Repository/DocumentRepository.php#L61 instead of bundle's trait. |
Thanks for the help, it seems this is due to a missing param: #782 |
Fixed by 0a533e9. |
Implementing a repository as per the Service Repositories docs:
i.e.
Kicks out an issue with
$registry
inparent::__construct($registry, Product::class);
of:I had a dig around in
ServiceRepositoryTrait
but wasn't able to figure out how to solve it.For reference, I also tested with the ORM's
ServiceEntityRepository
, but it did not experience the same problem.The text was updated successfully, but these errors were encountered: