PHPDriver is deprecated, but does that mean that we are forced to put entities and their metadata together? #10600
MetalArend
started this conversation in
General
Replies: 1 comment 2 replies
-
I do think XML is your only option here, unless maybe you want to write and maintain your own driver. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Working on a big project, where we try to keep our domain and infrastructure layers separated. We also want to avoid having to use xml files to keep that separation, so I went to see if there was an option to use php as standin replacement for the xml configuration. Turns out on https://www.doctrine-project.org/projects/doctrine-orm/en/2.14/reference/php-mapping.html#php-mapping it documents the php alternative for those xml files. But there's a big notice on the top stating that "PHPDriver is deprecated and will be removed in 3.0, use StaticPHPDriver instead."
Using the StaticPHPDriver is documented at https://www.doctrine-project.org/projects/doctrine-orm/en/2.14/reference/php-mapping.html#static-function, and it states "you want to keep your entity and mapping information together but don't want to use attributes or annotations". Well, ehm, we want to keep entity and mapping information separated in layers, so our domain can be used over multiple frameworks. Using attributes or annotations is already out of the question from the start, but are we forced to use xml (or heaven forbid yaml) to be able to do this? Or is there a php option I overlooked?
Beta Was this translation helpful? Give feedback.
All reactions