Skip to content

Commit 1a9a2c7

Browse files
committed
Fix enum case registration
An EnumCaseName::__toString() was added to the PHP 8.5 branch returning the FQCN of the enum case, which worked fine, but in the meanwhile, support for enum registration was added to master which implicitly relied on the EnumCaseName::__toString() method to return only the name of the case. That's why the "Verify the generated files are up to date" step was failing until this fix.
1 parent 27ebf47 commit 1a9a2c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/gen_stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3529,7 +3529,7 @@ public function getCDeclarations(): string
35293529

35303530
$i = 1;
35313531
foreach ($this->enumCaseInfos as $case) {
3532-
$cName = 'ZEND_ENUM_' . str_replace('\\', '_', $this->name->toString()) . '_' . $case->name;
3532+
$cName = 'ZEND_ENUM_' . str_replace('\\', '_', $this->name->toString()) . '_' . $case->name->case;
35333533
$code .= "\t{$cName} = {$i},\n";
35343534
$i++;
35353535
}

0 commit comments

Comments
 (0)