Skip to content

[WIP] Support Doctrine MongoDB ODM #36

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

Closed
wants to merge 3 commits into from

Conversation

alcaeus
Copy link

@alcaeus alcaeus commented Aug 7, 2018

Fixes #26.

This PR introduces compatibility with MongoDB ODM. A quick summary:

  • All Entity* classes have been replaced by corresponding Object* classes. To avoid BC breaks, existing classes remain but throw a silenced deprecation warning so people can update their code if they extend those classes
  • ObjectManagerGetRepositoryDynamicReturnTypeExtension takes a managerClass constructor argument to be able to return different repository class names for ODM and ORM. The service configuration was updated to contain all three mappings for doctrine/persistence, doctrine/orm and doctrine/mongodb-odm.
  • BC break: The doctrine.repositoryClass parameter was renamed to doctrine.orm.repositoryClass to better differentiate it from the other class names. This can be reversed, although I'm not sure of a good way to throw a deprecation notice for this.

Todos:

  • Update tests to cover MongoDB ODM as well
  • Document functionality
  • Add type extension for Doctrine\Common\Persistence\ManagerRegistry

@alterphp
Copy link

@alcaeus May we help you on this ?

@alcaeus
Copy link
Author

alcaeus commented Oct 18, 2018

I've put work on hold since there are other PRs achieving the same thing and I haven't received any feedback from @ondrejmirtes on how to proceed. I'm not working on this until those questions are resolved to avoid doing work for nothing.

@alcaeus alcaeus closed this Dec 21, 2018
@alcaeus alcaeus deleted the mongodb-odm-support branch December 21, 2018 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants