From df8de8e484003f68cd2fa68db1e6cfb47a3a92cb Mon Sep 17 00:00:00 2001 From: Martin Rademacher Date: Fri, 13 Oct 2023 09:26:34 +1300 Subject: [PATCH] Avoid unguarded use of `enum_exists` (#1486) --- src/Processors/ExpandEnums.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Processors/ExpandEnums.php b/src/Processors/ExpandEnums.php index 4a7cd30dd..054079729 100644 --- a/src/Processors/ExpandEnums.php +++ b/src/Processors/ExpandEnums.php @@ -84,7 +84,7 @@ protected function expandSchemaEnum(Analysis $analysis): void // transform each Enum cases into UnitEnum foreach ($schema->enum as $enum) { - if (is_string($enum) && enum_exists($enum)) { + if (is_string($enum) && function_exists('enum_exists') && enum_exists($enum)) { foreach ($enum::cases() as $case) { $cases[] = $case; }