From 3793b2569292e37376346725ac883514e0c8bb11 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Thu, 26 Jan 2023 12:59:38 +0000 Subject: [PATCH] Remove commented-out code sections This removes comments added in #10431 on the 2.15.x branch, as suggested in https://github.com/doctrine/orm/pull/10460#issuecomment-1404889903. --- lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | 2 -- .../Tests/ORM/Mapping/BasicInheritanceMappingTest.php | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index f1b4292d291..845bcc3be81 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -156,8 +156,6 @@ protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonS $class->name, end($nonSuperclassParents) ); - // enable this in 3.0 - // throw MappingException::missingInheritanceTypeDeclaration(end($nonSuperclassParents), $class->name); } foreach ($class->embeddedClasses as $property => $embeddableClass) { diff --git a/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php b/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php index 3a74bcbc39a..f7106736c64 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php @@ -230,15 +230,7 @@ public function testUndeclaredHierarchyRejection(string $rootEntity, string $chi { $this->expectDeprecationWithIdentifier('https://github.com/doctrine/orm/pull/10431'); - /* on 3.0, use this instead: */ - // self::expectException(MappingException::class); - // self::expectExceptionMessage(\sprintf( - // "Entity class '%s' is a subclass of the root entity class '%s', but no inheritance mapping type was declared.", - // $childClass, - // $rootEntity - // )); - - $this->cmf->getMetadataFor($childClass); + $this->cmf->getMetadataFor($childClass); } public function invalidHierarchyDeclarationClasses(): Generator