Просмотр исходного кода

[DoctrineBundle] changed mapping file suffix from .orm.dcm.yml to .orm.yml

Fabien Potencier 14 лет назад
Родитель
Сommit
dfd5b653cb

+ 3 - 3
UPDATE.md

@@ -14,7 +14,7 @@ beta1 to beta2
 
 * The Doctrine metadata files has moved from
   ``Resources/config/doctrine/metadata/orm/`` to ``Resources/config/doctrine``
-  and the extension from ``.dcm.yml`` to ``.orm.dcm.yml``
+  and the extension from ``.dcm.yml`` to ``.orm.yml``
 
   Before:
 
@@ -23,8 +23,8 @@ beta1 to beta2
 
   After:
 
-        Resources/config/doctrine/Bundle.Entity.orm.dcm.xml
-        Resources/config/doctrine/Bundle.Entity.orm.dcm.yml
+        Resources/config/doctrine/Bundle.Entity.orm.xml
+        Resources/config/doctrine/Bundle.Entity.orm.yml
 
 * With the introduction of a new Doctrine Registry class, the following
   parameters have been removed (replaced by methods on the `doctrine`

+ 3 - 3
src/Symfony/Bundle/DoctrineAbstractBundle/DependencyInjection/AbstractDoctrineExtension.php

@@ -263,11 +263,11 @@ abstract class AbstractDoctrineExtension extends Extension
         }
         $container->addResource(new FileResource($resource));
 
-        if (($files = glob($dir.'/'.$configPath.'/*.orm.dcm.xml')) && count($files)) {
+        if (($files = glob($dir.'/'.$configPath.'/*.orm.xml')) && count($files)) {
             return 'xml';
-        } elseif (($files = glob($dir.'/'.$configPath.'/*.orm.dcm.yml')) && count($files)) {
+        } elseif (($files = glob($dir.'/'.$configPath.'/*.orm.yml')) && count($files)) {
             return 'yml';
-        } elseif (($files = glob($dir.'/'.$configPath.'/*.orm.dcm.php')) && count($files)) {
+        } elseif (($files = glob($dir.'/'.$configPath.'/*.orm.php')) && count($files)) {
             return 'php';
         }
 

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/Command/GenerateEntityDoctrineCommand.php

@@ -103,7 +103,7 @@ EOT
             $mappingPath = $mappingCode = false;
         } else {
             $mappingType = 'yaml' == $mappingType ? 'yml' : $mappingType;
-            $mappingPath = $bundle->getPath().'/Resources/config/doctrine/'.str_replace('\\', '.', $fullEntityClassName).'.orm.dcm.'.$mappingType;
+            $mappingPath = $bundle->getPath().'/Resources/config/doctrine/'.str_replace('\\', '.', $fullEntityClassName).'.orm.'.$mappingType;
             $mappingCode = $exporter->exportClassMetadata($class);
 
             $entityGenerator = $this->getEntityGenerator();

+ 2 - 2
src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php

@@ -89,9 +89,9 @@ EOT
                 $className = $class->name;
                 $class->name = $bundle->getNamespace().'\\Entity\\'.$className;
                 if ('annotation' === $type) {
-                    $path = $destPath.'/'.$className.'.orm.dcm.php';
+                    $path = $destPath.'/'.$className.'.orm.php';
                 } else {
-                    $path = $destPath.'/'.str_replace('\\', '.', $class->name).'.orm.dcm.'.$type;
+                    $path = $destPath.'/'.str_replace('\\', '.', $class->name).'.orm.'.$type;
                 }
                 $output->writeln(sprintf('  > writing <comment>%s</comment>', $path));
                 $code = $exporter->exportClassMetadata($class);

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/XmlDriver.php

@@ -22,7 +22,7 @@ class XmlDriver extends BaseXmlDriver
 {
     protected $_globalFile = 'mapping';
     protected $_classCache;
-    protected $_fileExtension = '.orm.dcm.xml';
+    protected $_fileExtension = '.orm.xml';
 
     public function isTransient($className)
     {

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/Mapping/Driver/YamlDriver.php

@@ -22,7 +22,7 @@ class YamlDriver extends BaseYamlDriver
 {
     protected $_globalFile = 'mapping';
     protected $_classCache;
-    protected $_fileExtension = '.orm.dcm.yml';
+    protected $_fileExtension = '.orm.yml';
 
     public function isTransient($className)
     {

src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/Resources/config/doctrine/Fixtures.Bundles.XmlBundle.Entity.Test.orm.dcm.xml → src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/Resources/config/doctrine/Fixtures.Bundles.XmlBundle.Entity.Test.orm.xml


src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/YamlBundle/Resources/config/doctrine/Fixtures.Bundles.YamlBundle.Entity.Test.orm.dcm.yml → src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/YamlBundle/Resources/config/doctrine/Fixtures.Bundles.YamlBundle.Entity.Test.orm.yml