From 13a65b6cc9bd572f325d6cd05ea2d67ce5fab178 Mon Sep 17 00:00:00 2001 From: Cees Geene Date: Fri, 23 Feb 2024 03:57:12 +0100 Subject: [PATCH] Skip abstract entity type classes from being exposed with their short class name (#5856) --- src/Commands/core/CliCommands.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/core/CliCommands.php b/src/Commands/core/CliCommands.php index 8e81b5ffb9..d083112049 100644 --- a/src/Commands/core/CliCommands.php +++ b/src/Commands/core/CliCommands.php @@ -314,7 +314,7 @@ public function makeEntitiesAvailableWithShortClassNames(): void $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)) { + if ($reflectionClass->isAbstract() || $reflectionClass->isFinal() || class_exists($end)) { continue; } // Make it possible to easily load revisions.