JMSSerializerBundle icon indicating copy to clipboard operation
JMSSerializerBundle copied to clipboard

[Improvement] Ability to load yaml metadatas for same namespace from different directories.

Open Yivan opened this issue 6 years ago • 0 comments

Hello,

We are stuck actually to use JMS Serializer, because we have metadatas yml files for same namespace placed in several directories.

Exemple: My/Name/Space/EntityA is in src/MyBundle1/Resources/config/serializer/My.Name.Space.EntityA.yml My/Name/Space/EntityB is in src/MyBundle2/Resources/config/serializer/My.Name.Space.EntityB.yml

Actually with $prefix => $path (see method addMetadataDirs), for a given namespace, we can only have one directory for one namespace. As we cannot change namespaces for those classes, and only the class name differs, we are blocked to load metadatas from different directories.

It would be nace to be able to set directly the $class => $file for instance, as a workround. Or a way to redefine location strategy.

Thanks.

Yivan avatar Dec 01 '19 22:12 Yivan