NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #5917 most downloaded on Packagist
Provides reflection information, based on raw source
Latest stable
5.2.0
Last release 19 days ago
03 Nov 2026
Ships unpredictably
gaps range from 2 weeks to 4.8 years
Most releases are documented
notes for 18 of 29 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
31 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Name missing ancestors of a partial reflection as written in the source in https://github.com/goaop/parser-reflection/pull/254
Full Changelog: https://github.com/goaop/parser-reflection/compare/5.1.0...5.2.0
Full Changelog: 5.1.0...5.2.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Partial reflection of classes whose ancestors can not be located in https://github.com/goaop/parser-reflection/pull/252
Full Changelog: https://github.com/goaop/parser-reflection/compare/5.0.2...5.1.0
Full Changelog: 5.0.2...5.1.0
fix(phpstan): drop the null check that the trait alias lookup can not fail in https://github.com/goaop/parser-reflection/pull/247
Full Changelog: https://github.com/goaop/parser-reflection/compare/5.0.1...5.0.2
Full Changelog: 5.0.1...5.0.2
Patch release to improve the performance of engine by creating the parser and the name resolver on the first parse (4.x) in https://github.com/goaop/p
Patch release to improve the performance of engine by creating the parser and the name resolver on the first parse (4.x) in https://github.com/goaop/parser-reflection/pull/239
Full Changelog: https://github.com/goaop/parser-reflection/compare/5.0.0...5.0.1
Patch release to improve the performance of engine by creating the parser and the name resolver on the first parse (4.x) in #239
Full Changelog: 5.0.0...5.0.1
Internal functions newly deprecated in 8.6 (strcoll() et al.) report isDeprecated() and their #[\Deprecated] payload correctly through the native fall…
This release brings the library to full PHP 8.6 reflection parity ahead of the PHP 8.6 GA (planned 2026-11-19): parameter doc comments, scope-aware property accessibility, readonly property defaults, partial function application, and the 8.6 attribute-API additions are all reflected statically from the AST — without loading the reflected code into memory. All 8.6 behavior is validated against PHP 8.6.0RC2 and guarded by runtime version checks, so the library runs identically on PHP 8.5. Tracked in epic #219.
>=8.4) — #218. The CI matrix runs PHP 8.5 (lowest + highest deps) with PHP 8.6 as experimental.nikic/php-parser: ^5.9 is now required — the first release parsing PHP 8.6 partial-application placeholders (ArgPlaceholder) — #224ReflectionAttribute::getArguments(), matching native reflection (previously they were collapsed into a positional list) — #225ReflectionClassConstant::__toString() now prints the constant's doc comment like native reflection, and renders boolean values as true/false on PHP 8.6+ (following the native rendering change) — #225, #223ReflectionParameter::getDocComment() — doc comments on parameters (plain, promoted, variadic, by-ref, combined with attributes), byte-for-byte native parity; available on every supported runtime. Known limitation: a doc comment written after a parameter is dropped by PHP-Parser — #221ReflectionProperty::isReadable() / isWritable() — scope-aware accessibility emulation covering visibility, asymmetric (set) visibility, readonly (incl. the implicit protected(set)), property hooks, virtual properties, and object initialization state; validated against native 8.6 across ~12,800 combinations. Deliberate divergence: scope classes are resolved statically, never autoloaded — #222hasDefaultValue() / getDefaultValue() / getDefaultProperties() for readonly properties with defaults, verified against PHP 8.6.0RC2 across scalar, const-expression, class-constant, enum-case and array defaults — #223f(?), f(name: ?) and f(1, ...) reflect cleanly on every host runtime; placeholder arguments in constant-expression positions degrade into a catchable ReflectionException (the same contract as first-class callables) — #224ReflectionAttribute::getShortName(), getNamespaceName(), inNamespace() and ReflectionConstant::inNamespace() implemented (the inherited native implementations fatal on parsed attributes) — #225#[\Override] on class constants (incl. interface and enum constants) and __debugInfo() on enums are fully reflected — #225strcoll() et al.) report isDeprecated() and their #[\Deprecated] payload correctly through the native fallback — #215getDefaultValueExpression() on typed properties/parameters without a default value — #223isVirtual() no longer misreports a property whose short-form get hook references its own backing store — #222FileWith*86.php stub convention with PHP_VERSION_ID >= 80600 guards) and a deprecation-clean audit against the "Deprecations for PHP 8.6" RFC (no hits) — #220phpunit/phpunit ^13.3, rector/rector ^2.6.7 (required: Rector preloads its bundled php-parser under PHPUnit ≥ 12, so the bundle must also be ≥ 5.9)Full Changelog: https://github.com/goaop/parser-reflection/compare/4.0.0...5.0.0
Known follow-ups (out of this release's scope): #233, #234, #235, and possibly mirroring the new 8.6 getDefaultValue() deprecation in the parsed implementation.
Nothing published for this version
Partial reflection of classes whose ancestors can not be located in https://github.com/goaop/parser-reflection/pull/252
Full Changelog: https://github.com/goaop/parser-reflection/compare/4.0.2...4.1.0
Full Changelog: 4.0.2...4.1.0
Nothing published for this version
Nothing published for this version
…getClosureCalledClass(), and #[\Deprecated] attribute support — #213
This is a major release that brings the library to full PHP 8.4 reflection parity: property hooks, the lazy-object API, native enum reflection, global constant reflection, and dozens of smaller gaps in the reflection API are now implemented on top of the AST — without loading the reflected code into memory.
>=8.2). The CI matrix runs PHP 8.4 and 8.5, with 8.6 as experimental.NodeExpressionResolver no longer implicitly autoloads classes while evaluating constant expressions. Reflection stays purely static; only APIs that genuinely need a live object (e.g. invoke()) trigger class loading.nikic/php-parser instead of the grammar of the host PHP version, so files using newer syntax can be reflected from an older runtime.ReflectionEnum, ReflectionEnumUnitCase and ReflectionEnumBackedCase — full static reflection for native enums, wired into ReflectionFile / ReflectionFileNamespace (new getEnums() method) — #189, #190, #192ReflectionConstant — reflection for const-declared global constants — #213NodeAwareInterface — every parsed reflection object now exposes its underlying AST node via getNode() — #200getHook(), getHooks(), hasHook(), hasHooks(), getSettableType(), isVirtual(), isDynamic(), plus correct getModifiers() for virtual and abstract properties — #161, #170, #171, #172, #213newLazyGhost(), newLazyProxy(), resetAsLazyGhost(), resetAsLazyProxy(), isLazy(), isUninitializedLazyObject(), initializeLazyObject(), markLazyObjectAsInitialized(), skipLazyInitialization(), getLazyInitializer() and raw property access (getRawValue() / setRawValue() / setRawValueWithoutLazyInitialization()) — #213final modifier on promoted constructor properties — #173, #213getTentativeReturnType(), hasTentativeReturnType(), isAnonymous(), getClosureUsedVariables(), getClosureCalledClass(), and #[\Deprecated] attribute support — #213getAttributes() now supports ReflectionAttribute::IS_INSTANCEOF filtering — #213insteadof and as alias adaptations — #177strlen(...)) supported in constant expressions — #193Enum::CASE->value expressions supported in constant expressions (e.g. parameter defaults) — #176static fn() => ...) supported in constant-expression contexts — #213NodeExpressionResolver::resolveExprClassConstFetch() — #178isSubclassOf() now compares fully-qualified class names via the resolved AST name — #180__toString() for inherited methods now renders the inherits OriginalClass section like native reflection — #181ReflectionParameter::getDeclaringClass() context resolution — #178phpstan/phpstan ^2.0), rector/rector bumped to ^2.0 — #156Full Changelog: https://github.com/goaop/parser-reflection/compare/3.1.0...4.0.0
Fix deprecated nullable type declarations for PHP 8.4+ compatibility by @Copilot in https://github.com/goaop/parser-reflection/pull/146
Full Changelog: https://github.com/goaop/parser-reflection/compare/3.0.1...3.1.0
Full Changelog: 3.0.1...3.1.0
Nothing published for this version
Bump year and PHP version in Readme
Bump year and PHP version in Readme
Bump year and PHP version in Readme
Bump year and PHP version in Readme
Nothing published for this version
This patch release fixes compatibility with PHP7.3 and PHP7.4 #103
This patch release fixes compatibility with PHP7.3 and PHP7.4 #103
Warning! Please, be aware that this repo is not maintained well and will be abandoned soon. Consider to upgrade your software to the Roave/BetterReflection library.
Fixed missing InternalPropertiesEmulationTrait in ReflectionClassCons…
Fixed missing InternalPropertiesEmulationTrait in ReflectionClassCons…
This minor release contains several fixes and improvements:
This minor release contains several fixes and improvements:
ReflectionClassConstant #93, #97 (by @MaximilianKresse)ReflectionMethod->getClosure($object = null) compatibility #88 (by @ddinchev)getNamespaceAliases() logic fix #96 (by @MaximilianKresse)Nothing published for this version
Small patch release for #89
Small patch release for #89
Nothing published for this version
This release enables usage of token positions during analysis in Go! AOP framework, see #78. Also contains improvements by @loren-osborn in #76
This release enables usage of token positions during analysis in Go! AOP framework, see #78. Also contains improvements by @loren-osborn in #76
Patch version with small fixes:
Patch version with small fixes:
PHP version was also bumped to be >=5.6.0. Pay an attention if you use this library with outdated PHP versions.
This release contains a lot of fixes and improvements since 1.1.0:
This release contains a lot of fixes and improvements since 1.1.0:
This release also provides support for parsing PHP7.1 files. However, ReflectionClassConstant and constants with modifiers are not supported yet.
Minor release, that contains several features and important bug-fixes:
Minor release, that contains several features and important bug-fixes:
ReflectionClass::hasConstant methodNothing published for this version
Nothing published for this version
This is first working version of ParserReflection :registered: library with almost compatible Reflection API. Enjoy!
This is first working version of ParserReflection :registered: library with almost compatible Reflection API. Enjoy!
First working version of ReflectionEngine with full emulation of original Reflection classes.
First working version of ReflectionEngine with full emulation of original Reflection classes.
Nothing published for this version
Nothing published for this version
One column per quarter.