Skip to content
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

Add Doctrine ODM integration #176

Merged
merged 1 commit into from
Apr 8, 2022
Merged

Conversation

IonBazan
Copy link
Contributor

@IonBazan IonBazan commented Jan 28, 2022

Adding Doctrine ODM integration:

  • Add simple base type
  • Add collection base type
  • Add tests for base types
  • Add types dumper
  • Integrate with bundle
  • Add tests for the dumper
  • Add tests for the bundle integration

Most tests could be copied from the v1 and adjusted slightly.

Please note that I added type option for each Doctrine Type - for now, ORM will only support single as collection is not implemented yet.

@ogizanagi ogizanagi added this to the 2.x milestone Jan 28, 2022
@ogizanagi ogizanagi mentioned this pull request Jan 28, 2022
24 tasks
@IonBazan IonBazan force-pushed the feature/mongodb branch 4 times, most recently from b9143ed to dcc9cb9 Compare February 4, 2022 08:11
@IonBazan IonBazan marked this pull request as ready for review February 25, 2022 10:55
@IonBazan
Copy link
Contributor Author

@ogizanagi this is now complete and ready for review! 🚀

I managed to extract common parts of TypeDumper tests so that we keep them DRY. I also used readonly typed properties instead of phpdocs for stricter type checking.

@ogizanagi
Copy link
Member

Thank you @IonBazan . Could you please add a short doc entry as well? 🙏🏻

@IonBazan
Copy link
Contributor Author

Sure! Added the readme and rebased on top of recent 2.x changes to keep the history clean. Cheers!

@ogizanagi ogizanagi merged commit ad2d4fd into Elao:2.x Apr 8, 2022
@ogizanagi
Copy link
Member

Sorry I took this long to merge this PR @IonBazan 😖
Thank you for the clean work

@IonBazan IonBazan deleted the feature/mongodb branch April 8, 2022 09:47
@IonBazan
Copy link
Contributor Author

IonBazan commented Apr 8, 2022

No worries, @ogizanagi! I'm glad I could help 🚀
BTW I am also working on a native Doctrine solution in doctrine/mongodb-odm#2412 but that will probably take some more time to be merged. Anyway this PR would still be valid as it allows to use enum arrays. Please also let me know if you are planning to port the collection feature for ORM integration here.

@ogizanagi
Copy link
Member

Please also let me know if you are planning to port the collection feature for ORM integration here.

Indeed, this is desirable, as described in #124:

  • Doctrine DBAL Types & types generator:
    - […]
    - Collection of enums (csv & json)

in a similar way it was implemented in v1.

@ogizanagi ogizanagi mentioned this pull request Apr 9, 2022
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