diff --git a/UPDATE.md b/UPDATE.md index 844d44cfc5..71ce258321 100644 --- a/UPDATE.md +++ b/UPDATE.md @@ -13,8 +13,9 @@ beta1 to beta2 is now managed directly by Symfony SE in ``AppKernel``. * The Doctrine metadata files has moved from - ``Resources/config/doctrine/metadata/orm/`` to ``Resources/config/doctrine`` - and the extension from ``.dcm.yml`` to ``.orm.yml`` + ``Resources/config/doctrine/metadata/orm/`` to ``Resources/config/doctrine``, + the extension from ``.dcm.yml`` to ``.orm.yml``, and the file name has been + changed to the short class name. Before: @@ -23,8 +24,8 @@ beta1 to beta2 After: - Resources/config/doctrine/Bundle.Entity.orm.xml - Resources/config/doctrine/Bundle.Entity.orm.yml + Resources/config/doctrine/Entity.orm.xml + Resources/config/doctrine/Entity.orm.yml * With the introduction of a new Doctrine Registry class, the following parameters have been removed (replaced by methods on the `doctrine` diff --git a/src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/XmlDriver.php b/src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/XmlDriver.php index 3981aec03b..60d857648a 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/XmlDriver.php +++ b/src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/XmlDriver.php @@ -60,4 +60,13 @@ class XmlDriver extends BaseXmlDriver } } } + + protected function _findMappingFile($className) + { + if (false !== $pos = strrpos($className, '\\')) { + $className = substr($className, $pos+1); + } + + return parent::_findMappingFile($className); + } } diff --git a/src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/YamlDriver.php b/src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/YamlDriver.php index 6f89166e9b..3b876c9a6d 100644 --- a/src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/YamlDriver.php +++ b/src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/YamlDriver.php @@ -60,4 +60,13 @@ class YamlDriver extends BaseYamlDriver } } } + + protected function _findMappingFile($className) + { + if (false !== $pos = strrpos($className, '\\')) { + $className = substr($className, $pos+1); + } + + return parent::_findMappingFile($className); + } }