webfactory / doctrine-orm-test-infrastructure

Provides utils to create a test infrastructure for Doctrine ORM entities.
MIT License
20 stars 5 forks source link

Add support for all mapping drivers #39

Closed Okhoshi closed 8 months ago

Okhoshi commented 1 year ago

With PHP8 Attributes, Doctrine is slowly phasing out annotations. It would be awesome to have support for Attributes with this project, as well as other Mapping Driver.

It would probably also fix #14.

mpdude commented 8 months ago

Sorry for not getting back to this for so long 🐼 .

I have an alternative solution in #48 that works not by passing the type of mapping as a string, but by providing the mapping driver directly. That also supports 'hybrid' configurations that might not be possible with the solution suggested here.

Also, being able to pass a MappingDriver might allow for better integration with frameworks like Symfony, where the MappingDriver can be obtained from the DIC and is readily (auto-)configured.

Okhoshi commented 8 months ago

No worries ! Happy to see some activity on this project again ! 🎉

I'm perfectly fine with #48, it indeed solves the problem in a more elegant way 👍

Closing this in favor of #48 then.