Repository navigation
Close #6590: enum type constant compliance coverage - #6599
Merged
Merged
Conversation
Enum user const on backed enums already resolves via #6407; wire the issue repro, maintainer script, and enum_type_constant.phpt guard. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jun 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
public conston backed enums (E::X,constant('E::X'),defined('E::X')) already resolves on VM/JIT via Language: enum class/trait/interface constants — E::X must resolve (zend_enum.c, zend_constants.c) #6407; this PR wires the missing compliance guard and maintainer repro from the issue.test/compliance/cases/language/enum_type_constant.phptand registers it inEnumVMTest.test/repro/maintainer_enum_type_constant.phpmatching the issue repro.Verification
Issue repro (VM):
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/repro/maintainer_enum_type_constant.php'Issue repro (JIT):
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/jit.php test/repro/maintainer_enum_type_constant.php'Compliance filter from issue acceptance criteria:
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter enum_type_constant'Note: AOT compile for backed enums still segfaults (pre-existing;
enum_backed.phptalso fails with exit 139). Out of scope for this language parity ticket — tracked separately.php-src reference
Zend/zend_enum.c— enum constant tableZend/zend_compile.c—zend_compile_enumconstant registrationMade with Cursor