doctrine / mongodb-odm

The Official PHP MongoDB ORM/ODM
https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/
MIT License
1.09k stars 504 forks source link

Support union types in custom persistent collections #2258

Closed malarzm closed 3 years ago

malarzm commented 3 years ago

Feature Request

https://github.com/doctrine/mongodb-odm/blob/3bdfe97be472160ebbc924d5882ce61bd640a515/lib/Doctrine/ODM/MongoDB/PersistentCollection/DefaultPersistentCollectionGenerator.php#L295 needs to be able to handle union types

Q A
New Feature yes
RFC no
BC Break no
malarzm commented 3 years ago

The generator was based on doctrine/common's proxy generator so there's a great chance we can mimic https://github.com/doctrine/common/pull/910