From d7004b102c853fcfdce8e0ecc9fd09a47e81e16b Mon Sep 17 00:00:00 2001 From: Maciej Malarz Date: Sat, 30 Jul 2016 23:07:35 +0200 Subject: [PATCH] Remove DiscriminatorField's name and fieldName --- .../Mapping/Annotations/DiscriminatorField.php | 14 -------------- .../MongoDB/Mapping/Driver/AnnotationDriver.php | 9 +-------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/lib/Doctrine/ODM/MongoDB/Mapping/Annotations/DiscriminatorField.php b/lib/Doctrine/ODM/MongoDB/Mapping/Annotations/DiscriminatorField.php index b9e366911b..4b28e75b99 100644 --- a/lib/Doctrine/ODM/MongoDB/Mapping/Annotations/DiscriminatorField.php +++ b/lib/Doctrine/ODM/MongoDB/Mapping/Annotations/DiscriminatorField.php @@ -28,18 +28,4 @@ */ final class DiscriminatorField extends Annotation { - /** - * Available for BC, but AnnotationDriver will consider $value first. - * - * @deprecated property was deprecated in 1.2 and will be removed in 2.0 - */ - public $name; - - /** - * Available for BC, but AnnotationDriver will consider $name and $value - * first. - * - * @deprecated property was deprecated in 1.0.0-BETA10 and will be removed in 2.0 - */ - public $fieldName; } diff --git a/lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php index 4b8e71bbc3..14c2d29bbb 100644 --- a/lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php @@ -85,14 +85,7 @@ public function loadMetadataForClass($className, ClassMetadata $class) } elseif ($annot instanceof ODM\InheritanceType) { $class->setInheritanceType(constant(MappingClassMetadata::class . '::INHERITANCE_TYPE_'.$annot->value)); } elseif ($annot instanceof ODM\DiscriminatorField) { - // $fieldName property is deprecated, but fall back for BC - if (isset($annot->value)) { - $class->setDiscriminatorField($annot->value); - } elseif (isset($annot->name)) { - $class->setDiscriminatorField($annot->name); - } elseif (isset($annot->fieldName)) { - $class->setDiscriminatorField($annot->fieldName); - } + $class->setDiscriminatorField($annot->value); } elseif ($annot instanceof ODM\DiscriminatorMap) { $class->setDiscriminatorMap($annot->value); } elseif ($annot instanceof ODM\DiscriminatorValue) {