From 43c9c1a7951ae1537ee3102165598f34b7498c37 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 10 Sep 2024 14:35:38 +0200 Subject: [PATCH] fix php symfony getSerialized for emum get '0' value --- .../src/main/resources/php-symfony/model_generic.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache b/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache index 9dba64f5345c..dc5a0a5552b6 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/model_generic.mustache @@ -52,7 +52,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}} */ public function getSerialized{{nameInPascalCase}}(): string|null { - return $this->{{name}}?->value ? (string) $this->{{name}}->value : null; + return is_string(($this->{{name}}?->value) ? (string) $this->{{name}}->value : null; } /**