diff --git a/src/Traits/Deserializes.php b/src/Traits/Deserializes.php index 406b7177d..e62bf1533 100644 --- a/src/Traits/Deserializes.php +++ b/src/Traits/Deserializes.php @@ -44,7 +44,6 @@ public static function deserialize(mixed $data): mixed $attributeMap = $hasAttributeMap ? array_flip($reflectionClass->getProperty('attributeMap')->getValue()) : []; - $unknownKeys = []; foreach ($data as $rawKey => $value) { $key = $rawKey; @@ -53,18 +52,11 @@ public static function deserialize(mixed $data): mixed } if (! array_key_exists($key, $attributeTypes)) { - $unknownKeys[] = $key; - continue; } $deserializedParams[$key] = static::deserializeValue($value, $attributeTypes[$key]); } - if (count($unknownKeys) > 0) { - $cls = static::class; - echo "Warning: Unknown keys when deserializing into $cls: ".implode(', ', $unknownKeys)."\n"; - } - return new static(...$deserializedParams); }