Skip to content

Commit

Permalink
Fix makeEntitiesAvailableWithShortClassNames to handle abstract class…
Browse files Browse the repository at this point in the history
…es (#5899) (#5900)

Co-authored-by: TBiesenbeek <[email protected]>
  • Loading branch information
MakerTim and TBiesenbeek authored Mar 13, 2024
1 parent 0d54511 commit 716da4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Commands/core/CliCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ public function makeEntitiesAvailableWithShortClassNames(): void
$reflectionClass = new \ReflectionClass($class);
$parts = explode('\\', $class);
$end = end($parts);
// https://github.com/drush-ops/drush/pull/5729 and https://github.com/drush-ops/drush/issues/5730.
if ($reflectionClass->isFinal() || class_exists($end)) {
// https://github.com/drush-ops/drush/pull/5729, https://github.com/drush-ops/drush/issues/5730
// and https://github.com/drush-ops/drush/issues/5899.
if ($reflectionClass->isFinal() || $reflectionClass->isAbstract() || class_exists($end)) {
continue;
}
// Make it possible to easily load revisions.
Expand Down

0 comments on commit 716da4a

Please sign in to comment.