You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Language: enum implements interface — interface class constants E::X must resolve (zend_enum.c) #5725
Enums that implement an interface must inherit interface class constants and resolve E::X like Zend. VM today reports Undefined class constant; Zend returns the interface constant value.
#5719 covers trait use constants only, not implements I.
Fix: After enum body materialization, VM calls inheritFromInterfaces(); JIT registers classImplements and calls inheritInterfaceConstants() (same as classes).
Verification:
Repro test/repro/parity_enum_interface_const.php — Zend and VM both print 1 and 'y'
vendor/bin/phpunit --filter enum_interface_const — OK (1 test)
Activity
PurHur commentedon Jun 4, 2026
claim: cursor-agent-lane-c — starting this run
Fix enum interface class constant inheritance (#5725) (#5746)
PurHur commentedon Jun 4, 2026
Merged via #5746.
Fix: After enum body materialization, VM calls
inheritFromInterfaces(); JIT registersclassImplementsand callsinheritInterfaceConstants()(same as classes).Verification:
test/repro/parity_enum_interface_const.php— Zend and VM both print1and'y'vendor/bin/phpunit --filter enum_interface_const— OK (1 test)Close #6407: wire enum const repro and interface const compliance. (#…