Skip to content

Stdlib: Reflection::getModifierNames() + register Reflection (#22127) - #22153

Merged
PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-22127-reflection-get-modifier-names
Jul 22, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-22127-reflection-get-modifier-names

Conversation

@PurHur

@PurHur PurHur commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #22127

php-src reference

  • ext/reflection/php_reflection.c — zim_Reflection_getModifierNames
  • ext/reflection/php_reflection.stub.php — class Reflection

PHP implementation

  • ext/standard/VmReflection.php — reflectionGetModifierNames()
  • lib/VM/Builtin/ReflectionGetModifierNames.php
  • lib/VM/BuiltinClasses.php — register Reflection

Test plan

  • ./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/repro/maintainer_reflection_get_modifier_names.php'
  • Same repro on host Zend
  • vendor/bin/phpunit --filter reflection_get_modifier_names (VM + JIT)
  • php script/bootstrap-inventory.php --check → OK 6359/6359
  • ./script/check-generated-docs.sh → OK

Verification transcript

17=["public","static"]
...
OK
EXIT:0
# phpunit
OK (2 tests, 2 assertions)
# inventory
OK 6359/6359
check-generated-docs: all generated docs in sync.

Made with Cursor

…22127)

Register php-src's Reflection utility class and map modifier bitmasks to
name lists (abstract/final/virtual/PPP/PPP_SET/static/readonly). Also route
StringQuotemeta through ensureLinked so NestedJIT no longer calls a private
implement() after #21589.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur force-pushed the agent/advanced-stdlib-22127-reflection-get-modifier-names branch from 0d216bc to 1d73564 Compare July 22, 2026 11:03
@PurHur
PurHur merged commit bd6b1a4 into master Jul 22, 2026
1 check failed
@PurHur
PurHur deleted the agent/advanced-stdlib-22127-reflection-get-modifier-names branch July 22, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant