NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #852 most downloaded on Packagist
Reflection library to do Static Analysis for PHP Projects
Latest stable
7.0.0
Last release 5 months ago
28 May 2026
Ships fairly regularly
a new release about every 6 months
Some releases are documented
notes for 26 of 44 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
56 releases · first in 2012
Drag across the ruler to compare, or tap a release to open it.
This version contains breaking changes in regard to returned types where phpDocumentor\Reflection\Type is returned. You can consult Type resolver upgr…
This version contains breaking changes in regard to returned types where phpDocumentor\Reflection\Type is returned. You can consult Type resolver upgrade docs for more details about what has been changed in types.
In v6 Expressions as strings were deprecated. We removed the support for string expressions like described in the deprecation in v6. By now only expression objects are returned.
phpdocumentor/reflection-docblock v6 and phpdocumentor/type-resolver v2 by @mspirkov in https://github.com/phpDocumentor/Reflection/pull/723Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.5.0...7.0.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Add support for PHP 8.4 interface properties by @lacatoire in https://github.com/phpDocumentor/Reflection/pull/739
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.5.0...6.6.0
Files did not get any context when processed by @jaapio in https://github.com/phpDocumentor/Reflection/pull/717
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.4.4...6.5.0
Fix issue with self referenced constants.
Fix issue with self referenced constants.
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.4.3...6.4.4
Fix class resolve in expression containing a constant fetch.
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.4.2...6.4.3
Resolve issue with expressions where some default values were resolved incorrectly as FQSEN, now null will result in a Null_ type and booleans will re
Resolve issue with expressions where some default values were resolved incorrectly as FQSEN, now null will result in a Null_ type and booleans will result in True_ or False_. other values remain unchanged.
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.4.1...6.4.2
Thanks to @bshaffer for reporting #697
Thanks to @bshaffer for reporting #697
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.4.0...6.4.1
This version adds support for more complex expressions in method arguments. The expressions allow users of this library to extract type information fr
This version adds support for more complex expressions in method arguments. The expressions allow users of this library to extract type information from default values of arguments.
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.3.0...6.4.0
This version adds support to detect virtual properties.
This version adds support to detect virtual properties.
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.2.1...6.3.0
Version 6.2.0 contained a wrong named class for Asymmetric visibility. This version renames the class, which should be considered a backward compatibi
Version 6.2.0 contained a wrong named class for Asymmetric visibility. This version renames the class, which should be considered a backward compatibility break. But because the release is rather new I do accept this for a patch release.
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.2.0...6.2.1
In this version we introduced support for asymmetric visibility and property hooks.
In this version we introduced support for asymmetric visibility and property hooks.
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.1.0...6.2.0
Added support for php 8.4. This doesn't add any of the new features of php 8.4 but does allow our users to upgrade to php 8.4
Added support for php 8.4. This doesn't add any of the new features of php 8.4 but does allow our users to upgrade to php 8.4
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.0.0...6.1.0
In php 8.2 dynamic properties were deprecated as this project was using dynamic properties to add extra information to the phpparser nodes we needed t…
In this version we added support for Attributes and improved the way this project can be extended using Reducers. Added support for php 8.3 features and upgraded to version 5 of phpparser.
In PHP8 attributes were added to the language. Attributes are great at runtime but kinda hurdle to take in reflection of the code base as we do not load any classes into our runtime. We are just processing your code as it was plain text. This means that attribute classes are not available as classes, but also a lot of information is gone that you would normally have when loading attributes.
In this version we added a way to support reflection of attributes describing the format of the defined attributes and their call parameters. CallParameters have an optional name if named parameters are used in the usage of an attribute. This should give our users enough information to get everything out. More features will be added in the future.
During the development of the project we noticed that we were handling similar constructs over and over again. But as we wanted to keep the factories creating the elements decouples we were not able to reuse code. The new concept of Reducer solves this issue. Reducers are post creation strategies that are executed after the factory created an element. Attributes are a good example of extra data that can be added to any kind of code element, the creation of attributes is always the same. Each factory can have a number of reducers and they can be defined per factory.
In php 8.2 dynamic properties were deprecated as this project was using dynamic properties to add extra information to the phpparser nodes we needed to change that functionality. The foundation for this change including a forward compatibility option were added in v5.3 and with this new release the deprecation is removed. From now on FQSEN of nodes is only available as a node attribute. If your code contains custom factories replace the the usage of $object->fqsen with $object->getAttribute('fqsen')
We switched internally to phpparser v5 to ensure this project will keep working with the latest features in php. For normal usecases there won't be any difference. phpparser is still able to process old code back to php 5. But it is no longer possible to switch the parser version when using this project.
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.3.3...6.0.0
Fix: issue with invalid defines by @jaapio in https://github.com/phpDocumentor/Reflection/pull/456
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.3.2...5.3.3
Fix issue with inline defined functions by @jaapio
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.3.1...5.3.2
Add support for using traits in enums by @mvriel in https://github.com/phpDocumentor/Reflection/pull/301
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.3.0...5.3.1
Add support for constants in enums by @hemberger in https://github.com/phpDocumentor/Reflection/pull/253
psr/log dependency by @jeromegamez in https://github.com/phpDocumentor/Reflection/pull/247Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.2.0...5.3.0
Error with define if it uses variable in name. #237
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.1.1...5.2.0
Detect file-level docblocks when the file is flowing PSR-12. by @jaapio
Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.1.0...5.1.1
GH Actions: turn on tests against PHP 8.1 & various other tweaks by @jrfnl in https://github.com/phpDocumentor/Reflection/pull/210
ramsey/composer-install by @jrfnl in https://github.com/phpDocumentor/Reflection/pull/229Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.0.0...5.1.0
This patch version is addressing a regression on v5 in functionality regarding v4.
This patch version is addressing a regression on v5 in functionality regarding v4.
This version contains a full rewrite of the way we construct elements. To support features like constructor property promotion we had to redesign the
This version contains a full rewrite of the way we construct elements. To support features like constructor property promotion we had to redesign the way methods are processed, but also allow factories to produce multiple elements. Which was impossible with the original design.
As a library consumer, this change should not affect your code, unless you were overwriting or extending some of the internal factory classes. To prevent issues for users of this library, we started a new version.
Fix namespace handling for defines and namespaced constants #157, thanks to @dirx
Fix namespace handling for defines and namespaced constants #157, thanks to @dirx
Version 4 is a full redesign of this library. There haven't been any changes since the latest beta release.
Version 4 is a full redesign of this library. There haven't been any changes since the latest beta release.
Ignore certain start nodes in a file which allows a declare before a file docblock and processing of files containing a shebang.
declare before a file docblock and processing of files containing a shebang.Strings in default values or constant values are no longer stripped of their quotes and match the pretty-printing rules of PHP Parser. This will allow
InvalidTag containing the exception causing the reason why this could not be properly parsed.Now supports global constants defined using either the const or global keyword
const or global keywordobject.First beta release of this series. With a massive performance fix. Which reduces the parsing time with 50%.
First beta release of this series. With a massive performance fix. Which reduces the parsing time with 50%.
addType from argument class, an argument can only have a single type. This way it is more aligned with the reflected code.
Removed:
argument class, an argument can only have a single type. This way it is more aligned with the reflected code.Fixes an performance issue when reflected code contains large methods.
Fixes an performance issue when reflected code contains large methods.
Fixes an issue when file strategy returns a null value
Fixes an issue when file strategy returns a null value
- Added argument type resolving - Updated to php-parser v4
bump reflection dependencies to newest alphas
bump reflection dependencies to newest alphas
* bump to PHP 7.1 minimum * add strict typing
With the upgrade to php-parser 1 we missed a class rename which prevented the correct handling of use statements. This release fixes that issue.
With the upgrade to php-parser 1 we missed a class rename which prevented the correct handling of use statements. This release fixes that issue.
Thanks to @alexjay for reporting and solving this issue.
This release was created to support php-7 syntax in phpdocumentor2. No new functionality was added. Only the php-parser dependency was upgraded to sup
This release was created to support php-7 syntax in phpdocumentor2. No new functionality was added. Only the php-parser dependency was upgraded to support php-7 syntax.
Note: Since we where already working on v2 of the reflection component we had to release v3 to follow the Semantic versioning. V2 will never be a released version of this component.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.