Commit 27ebf47ff1b for php.net
commit 27ebf47ff1ba5a5145a57176a5655e0ce11bfdb8
Author: Máté Kocsis <kocsismate@woohoolabs.com>
Date: Sun Apr 5 07:40:29 2026 +0200
Use readonly properties + CPP for EnumCaseName in gen_stub.php
diff --git a/build/gen_stub.php b/build/gen_stub.php
index 70265c40cb9..9c1f797485c 100755
--- a/build/gen_stub.php
+++ b/build/gen_stub.php
@@ -902,13 +902,10 @@ public function getDeclarationName(): string
}
class EnumCaseName {
- public /* readonly */ Name $enum;
- public /* readonly */ string $case;
-
- public function __construct(Name $enum, string $case)
- {
- $this->enum = $enum;
- $this->case = $case;
+ public function __construct(
+ public readonly Name $enum,
+ public readonly string $case
+ ) {
}
public function __toString(): string