diff --git a/src/Internal/CriteriaOrderings.php b/src/Internal/CriteriaOrderings.php index 1132fa387cf..88ab2a35a43 100644 --- a/src/Internal/CriteriaOrderings.php +++ b/src/Internal/CriteriaOrderings.php @@ -8,7 +8,7 @@ use Doctrine\Common\Collections\Order; use function array_map; -use function class_exists; +use function enum_exists; use function method_exists; use function strtoupper; @@ -38,7 +38,7 @@ private static function getCriteriaOrderings(Criteria $criteria): array */ private static function mapToOrderEnumIfAvailable(array $orderings): array { - if (! class_exists(Order::class)) { + if (! enum_exists(Order::class)) { return $orderings; }