diff --git a/src/Commands/core/CliCommands.php b/src/Commands/core/CliCommands.php index 563b256572..122f32213b 100644 --- a/src/Commands/core/CliCommands.php +++ b/src/Commands/core/CliCommands.php @@ -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.