fix invalid function is_subclass call for php-nextgen (#16712)

This commit is contained in:
Maddin
2023-10-05 06:34:50 +02:00
committed by GitHub
parent 822568b664
commit c306ca3cf2
3 changed files with 3 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ class ObjectSerializer
$getter = $data::getters()[$property];
$value = $data->$getter();
if ($value !== null && !in_array($openAPIType, [{{&primitives}}], true)) {
if (is_sublass_of($openAPIType, '\BackedEnum')) {
if (is_subclass_of($openAPIType, '\BackedEnum')) {
$data = $openAPIType::tryFrom($data);
if ($data === null) {
$imploded = implode("', '", array_map(fn($case) => $case->value, $openAPIType::cases()));