[DoctrineBundle] changes the naming convention for YML, and XML metadata files
This commit is contained in:
parent
7f7ea42870
commit
ff4a2209e3
@ -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`
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user