From e5db249e187edb2acf7217dfdd43a7a6a2883322 Mon Sep 17 00:00:00 2001 From: Toon Verwerft Date: Fri, 20 Dec 2024 09:47:38 +0100 Subject: [PATCH] Fix: Backed-enum simpletypes should not be wrapped by element encoders --- src/EncoderRegistry.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/EncoderRegistry.php b/src/EncoderRegistry.php index 0d998b8..aef4c87 100644 --- a/src/EncoderRegistry.php +++ b/src/EncoderRegistry.php @@ -7,7 +7,6 @@ use Soap\Encoding\ClassMap\ClassMapCollection; use Soap\Encoding\Encoder\AnyElementEncoder; use Soap\Encoding\Encoder\Context; -use Soap\Encoding\Encoder\ElementEncoder; use Soap\Encoding\Encoder\EncoderDetector; use Soap\Encoding\Encoder\ObjectEncoder; use Soap\Encoding\Encoder\OptionalElementEncoder; @@ -205,7 +204,7 @@ public function addBackedEnum(string $namespace, string $name, string $enumClass { $this->simpleTypeMap->add( (new QNameFormatter())($namespace, $name), - new ElementEncoder(new SimpleType\BackedEnumTypeEncoder($enumClass)) + new SimpleType\BackedEnumTypeEncoder($enumClass) ); return $this;