doctrine / DoctrineMongoDBBundle

Integrates Doctrine MongoDB ODM with Symfony
http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html
MIT License
377 stars 229 forks source link

Leverage targeted resolvers #773

Closed franmomu closed 1 year ago

franmomu commented 1 year ago

Closes https://github.com/doctrine/DoctrineMongoDBBundle/issues/770

Symfony allows array attributes for services tags since 6.2: https://github.com/symfony/symfony/pull/47364

franmomu commented 1 year ago

We are kind of stuck in here, the problem is that with targeted value resolvers, MapEntity is tied (by FQCN) to EntityValueResolver so we cannot register another one (https://github.com/symfony/symfony/issues/49905)

In our side, the only thing I can think of is to create a DocumentValueResolver class which would decorate EntityValueResolver and create a MapDocument class which would extend MapEntity.

boskos-q commented 1 year ago

In our side, the only thing I can think of is to create a DocumentValueResolver class which would decorate EntityValueResolver and create a MapDocument class which would extend MapEntity.

@franmomu imo this would make the most sense to do