Skip to content

Commit

Permalink
Handle final entity class in php:cli (#5729)
Browse files Browse the repository at this point in the history
* Handle final entity classs

Follow-up to #5717

* Update src/Commands/core/CliCommands.php
  • Loading branch information
heddn authored Aug 19, 2023
1 parent 30627b5 commit 5aee7ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Commands/core/CliCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ public function makeEntitiesAvailableWithShortClassNames(): void
{
foreach ($this->entityTypeManager->getDefinitions() as $definition) {
$class = $definition->getClass();
$reflectionClass = new \ReflectionClass($class);
if ($reflectionClass->isFinal()) {
continue;
}
$parts = explode('\\', $class);
// Make it possible to easily load revisions.
eval(sprintf('class %s extends \%s {
Expand Down

0 comments on commit 5aee7ef

Please sign in to comment.