The Symfony \ Doctrine \ ORM \ Mapping \ Driver \ SimplifiedYamlDriver project is really useful in my project to keep Entity file names clean and simple. However, JMSSerialize assumes that the naming convention for each Entity is a complete namespace. This is not true when using \ Doctrine \ ORM \ Mapping \ Driver \ SimplifiedYamlDriver in your Doctrine2 configuration.
( http://docs.doctrine-project.org/en/latest/reference/yaml-mapping.html )
<?php $namespaces = array( '/path/to/files1' => 'MyProject\Entities', '/path/to/files2' => 'OtherProject\Entities' ); $driver = new \Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver($namespaces);
According to docs: File names are abbreviated, "MyProject \ Entities \ User" will become User.orm.yml
But JMSSerialzer looks for YAML files in $ myDir. '/MyProject.Entities.User.yml'
(see: http://jmsyst.com/libs/serializer/master/configuration#configuring-metadata-locations )
Question: Is there a way to override the metadata file name that JMSSerialize is looking for? I already use addMetadataDir () to indicate its location
Note: this is not a symfony2 project
source share