瀏覽代碼

[mapping] remove ClassMetadata hints regarding changes in 2.2, closes #215

gedi 13 年之前
父節點
當前提交
365dc22117
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 2
      lib/Gedmo/Mapping/ExtensionMetadataFactory.php
  2. 1 2
      lib/Gedmo/Mapping/MappedEventSubscriber.php

+ 1 - 2
lib/Gedmo/Mapping/ExtensionMetadataFactory.php

@@ -3,7 +3,6 @@
 namespace Gedmo\Mapping;
 
 use Doctrine\Common\Persistence\ObjectManager;
-use Doctrine\Common\Persistence\Mapping\ClassMetadata;
 use Gedmo\Mapping\Driver\File as FileDriver;
 use Gedmo\Mapping\Driver\AnnotationDriverInterface;
 use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory;
@@ -68,7 +67,7 @@ final class ExtensionMetadataFactory
      * @param ClassMetadata $meta
      * @return array - the metatada configuration
      */
-    public function getExtensionMetadata(ClassMetadata $meta)
+    public function getExtensionMetadata($meta)
     {
         if ($meta->isMappedSuperclass) {
             return; // ignore mappedSuperclasses for now

+ 1 - 2
lib/Gedmo/Mapping/MappedEventSubscriber.php

@@ -9,7 +9,6 @@ use Doctrine\Common\Annotations\Reader;
 use Gedmo\Mapping\ExtensionMetadataFactory;
 use Doctrine\Common\EventSubscriber;
 use Doctrine\Common\Persistence\ObjectManager;
-use Doctrine\Common\Persistence\Mapping\ClassMetadata;
 use Doctrine\Common\EventArgs;
 
 /**
@@ -168,7 +167,7 @@ abstract class MappedEventSubscriber implements EventSubscriber
      * @param ClassMetadata $metadata
      * @return void
      */
-    public function loadMetadataForObjectClass(ObjectManager $objectManager, ClassMetadata $metadata)
+    public function loadMetadataForObjectClass(ObjectManager $objectManager, $metadata)
     {
         $factory = $this->getExtensionMetadataFactory($objectManager);
         $config = $factory->getExtensionMetadata($metadata);