Repository navigation
Stdlib: ReflectionProperty::getAsymmetricVisibility() — instance + static (#5060, #6772) - #8199
Merged
Merged
Conversation
…and static props (#5060, #6772). php-src: ext/reflection/php_reflection.c — returns null when symmetric, else get/set IS_* bitmasks via propertyVisibilityMeta (instance + static). Registers ReflectionProperty::IS_PUBLIC/IS_PROTECTED/IS_PRIVATE on the VM builtin class. Co-authored-by: Cursor <cursoragent@cursor.com>
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
ReflectionProperty::getAsymmetricVisibility(): ?arrayon the VM reflection builtin path (Stdlib: ReflectionProperty::getAsymmetricVisibility() — set/get masks (ext/reflection/php_reflection.c) #5060, Stdlib: ReflectionProperty::getAsymmetricVisibility() — static properties return wrong/null (ext/reflection/php_reflection.c) #6772).VmReflection::propertyVisibilityMeta()(instance + static asymmetric flags from compiler class table) and returns php-src filter bitmasks viavisibilityToReflectionBitmask()—nullwhen symmetric.ReflectionProperty::IS_PUBLIC/IS_PROTECTED/IS_PRIVATEon the VM builtin class for introspection parity.php-src reference:
ext/reflection/php_reflection.c—reflection_property_get_asymmetric_visibilityPHP implementation:
lib/VM/Builtin/ReflectionPropertyGetAsymmetricVisibility.php,ext/standard/VmReflection.php,lib/VM/BuiltinClasses.phpCloses #5060
Pairs with #6772 (static asymmetric props)
Verification
Output (VM repro):
PHPUnit:
OK (1 test, 1 assertion)—reflection_property_asymmetric_visibility.phptAOT lint: exit 0 for repro + fixture
No new C runtime logic.
Made with Cursor