neos / flow-development-collection

The unified repository containing the Flow core packages, used for Flow development.
https://flow.neos.io/
MIT License
137 stars 188 forks source link

Update FlowAnnotationDriver to match latest doctrine/ORM base #2402

Open albe opened 3 years ago

albe commented 3 years ago

https://github.com/doctrine/orm/blob/2.8.x/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php vs https://github.com/neos/flow-development-collection/blob/master/Neos.Flow/Classes/Persistence/Doctrine/Mapping/Driver/FlowAnnotationDriver.php

albe commented 3 years ago

See also https://github.com/doctrine/orm/blob/32108c4ca99c78e722305d177fbbc5f7468fab27/lib/Doctrine/ORM/Mapping/Driver/AttributesDriver.php in regards to PHP 8 attributes - those are incompatible to old doctrine docblock annotations and hence need to be handled separately. Meaning another annotation(attribute) driver we need to copy&adjust

kdambekalns commented 1 year ago

@fcool I assigned this to you, as you are effectively working on it… and to give it an air of shared responsibility, I assigned myself, too. 😇

kdambekalns commented 11 months ago

@fcool With the release of ORM 3.0 imminent and people stumbling over attributes not working as expected… at the sprint in Berlin we (well, you, TBH) worked on this topic. What is the current status, if any? 😎 Any news?

fcool commented 11 months ago

Of course there is a status... I'll use tomorrow to get all of my knowledge together and try to finalize // decide on what I tried and did so far. But I am most certain that the ORM 3.0 is a different story. That our current approach has its flaws, when it comes to doctrine implementing new features and us not catching them is something I already learned during the work with it. One of my experiments (and even the one we started at the last sprint), tries to improve on that, by NOT implementing an own Driver but an "Annotation generator" - which would of course break completely with the Annotation gets dropped (even if it is not to hard to change to the Attribute logic, but of course it is not an 1 to 1 exchange - some Annotations were dropped, some Attributes have different names, and stuff like that.)

I will risk a glimpse on ORM 3.0 - maybe that helps me even with the decision, from which work we can benefit most in the mid- and longer term.