Repository navigation
Language: enum user instance methods — VM case objects (#3390) - #3392
Merged
Merged
Conversation
Route enum case property reads through EnumCaseSupport before property hooks; fix isPropertyHookRawWrite to use php-cfg class operand ->value. Add enum_user_method / enum_backed_user_method compliance cases. Co-authored-by: Cursor <cursoragent@cursor.com>
PurHur
force-pushed
the
agent/issue-3390-enum-user-methods
branch
from
May 30, 2026 10:03
57e2ee4 to
7f89c66
Compare
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
ObjectEntryvalues atTYPE_DECLARE_CLASS_CONSTtime (unit and backed enums).name/valueproperty reads on enum case objects; backed enumechostill prints the scalar viaVariable::toString.$case->method(),$this->name).php-src reference
Zend/zend_enum.c— enum case object handlers,name/valuepropertiesZend/zend_compile.c—zend_compile_enum/ method registrationParser/CFG for enum methods was already in place (
patches/php-cfg-enum-class-method.patch,compileEnumBody); this PR completes VM runtime dispatch.Verification
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && ./vendor/bin/phpunit --filter EnumVMTest'Closes #3390
Made with Cursor