Repository navigation
Language: reject final plain property override across eval (#22988) - #23002
Merged
Merged
Conversation
Same-script FinalPropertyOverrideCheck already fatals, but separate eval() inheritance skipped the guard. Mirror final class-const handling in inheritFromParent so PROFILE=8.4 matches zend_inheritance.c. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
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
finalplain property already fatals in the same compile unit viaFinalPropertyOverrideCheck, but separateeval()inheritance skipped the guard and printedEVAL_OK.VM::inheritFromParent(same pattern as final class constants Regression: final class constants can be overridden by child class (re-#4455, Zend/zend_inheritance.c) #22329) soPHP_COMPILER_PROFILE=8.4matches php-srcZend/zend_inheritance.c..phpt+ unit test; JIT skips MCJIT inline-eval deferral (same asfinal_class_const_eval_override).Closes #22988
php-src reference
Zend/zend_inheritance.c—Cannot override final property %s::$%sPHP implementation
lib/VM.php—rejectChildOverrideOfFinalProperty()frominheritFromParentTest plan
vendor/bin/phpunit --filter "FinalPropertyOverrideCheckTest|final_plain_property_eval_override|final_plain_property_override_fatal"→ OK 12 testsTrust gates (pre-claim snapshot)
user_release_ready: no (pre-existing spine-coverage / north-star5-fast red on master — unrelated to this language fix)Made with Cursor