Skip to content

Commit 2d7b483

Browse files
committed
no deprecations (support php 8.1)
1 parent 8d3eb20 commit 2d7b483

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ private function processDynamicObjectType(string $domain, $typeSpec)
445445
$fromJson->addBody("return new static(\$rawData);");
446446
$fromJson->addComment("@param object \$rawData");
447447

448-
$jsonSerialize = $objectClass->addMethod("jsonSerialize");
448+
$jsonSerialize = $objectClass->addMethod("jsonSerialize")->addAttribute('ReturnTypeWillChange');
449449
$jsonSerialize->addBody("return \$this->rawData;");
450450

451451
$objectClass->addMethod("getRawData")
@@ -520,7 +520,7 @@ private function processObjectType(string $domain, $typeSpec, bool $withBuilder
520520
$fromJson->addComment("@param object \$data");
521521
$fromJson->addComment("@return static");
522522

523-
$jsonSerialize = $objectClass->addMethod("jsonSerialize");
523+
$jsonSerialize = $objectClass->addMethod("jsonSerialize")->addAttribute('ReturnTypeWillChange');
524524
$jsonSerialize->addBody("\$data = new \\stdClass();");
525525

526526
$builderClass = null;

0 commit comments

Comments
 (0)