Skip to content

Commit

Permalink
Remove commented-out code sections
Browse files Browse the repository at this point in the history
This removes comments added in doctrine#10431 on the 2.15.x branch, as suggested in doctrine#10460 (comment).
  • Loading branch information
mpdude committed Jan 26, 2023
1 parent 6568782 commit 1d92652
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
2 changes: 0 additions & 2 deletions lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
13 changes: 0 additions & 13 deletions lib/Doctrine/ORM/Mapping/MappingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,19 +539,6 @@ static function ($a, $b) {
);
}

/**
* @param class-string $rootEntityClass
* @param class-string $childEntityClass
*/
//public static function missingInheritanceTypeDeclaration(string $rootEntityClass, string $childEntityClass): self
//{
// return new self(sprintf(
// "Entity class '%s' is a subclass of the root entity class '%s', but no inheritance mapping type was declared.",
// $childEntityClass,
// $rootEntityClass
// ));
//}

/**
* @param string $className
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d92652

Please sign in to comment.