Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove commented-out code sections #10465

Merged
merged 1 commit into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
mpdude marked this conversation as resolved.
Show resolved Hide resolved
}

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