Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Reflection Laravel Package

phpdocumentor/reflection

PHPDoc reflection library used by phpDocumentor to parse docblocks and reflect types, namespaces, and symbols from PHP code. Helps tools extract documentation and metadata without executing code, powering static analysis and doc generation workflows.

View on GitHub
Deep Wiki
Context7
6.4.4

Fix issue with self referenced constants.

Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.4.3...6.4.4

6.4.3

What's Changed

Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.4.2...6.4.3

6.4.2

What's Changed

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

6.4.1

What's Changed

Thanks to @bshaffer for reporting #697

Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.4.0...6.4.1

6.4.0

What's Changed

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

6.3.0

What's Changed

This version adds support to detect virtual properties.

Full Changelog: https://github.com/phpDocumentor/Reflection/compare/6.2.1...6.3.0

6.2.1

What's Changed

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

6.2.0

What's Changed

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

6.1.0

What's Changed

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

6.0.0

6.0.0

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.

Attributes

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.

Reducers

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.

Removed deprecation

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')

phpparser v5

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

5.3.2

What's Changed

New Contributors

Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.3.1...5.3.2

5.3.1

Added

Fixed

Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.3.0...5.3.1

5.2.0

Fixed

  • Error with define if it uses variable in name. #237

Added

CI

New Contributors

Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.1.1...5.2.0

5.1.1

Fixes

  • Detect file-level docblocks when the file is flowing PSR-12. by @jaapio

CI

Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.1.0...5.1.1

5.1.0

Added

Fixed

New Contributors

Full Changelog: https://github.com/phpDocumentor/Reflection/compare/5.0.0...5.1.0

5.0.1

This patch version is addressing a regression on v5 in functionality regarding v4.

Fixed

  • Fixes regression of missing used traits in classes, #208.
5.0.0

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.

Added

  • Constructor promoted properties
  • php8 union types
  • php8 static type
  • php8 mixed type support
4.0.1

Fixes

Fix namespace handling for defines and namespaced constants #157, thanks to @dirx

4.0.0

Version 4 is a full redesign of this library. There haven't been any changes since the latest beta release.

4.0.0-beta4

Improvents

  • Ignore certain start nodes in a file which allows a declare before a file docblock and processing of files containing a shebang.
  • Top level if statements are now processed so conditional defined elements can be documented.

Fixes

  • Fixed FQSEN generation for defines in global namespace
4.0.0-beta3

Improvements

  • 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 consumers to more accurately represent values
  • Parsing a DocBlock with an invalid tag will no longer result in an exception but instead, generate an object of type InvalidTag containing the exception causing the reason why this could not be properly parsed.
4.0.0-beta2

New features

  • Now supports global constants defined using either the const or global keyword
  • Now supports Typed Properties (PHP 7.4 feature)
  • Now supports visibility for class constants (private, protected, public)

BC-break since 4.0.0-beta

  • factory \phpDocumentor\Reflection\Php\Factory\Constant was renamed to \phpDocumentor\Reflection\Php\Factory\ClassConstant; this only matters if you build your own ProjectFactory with non-default strategies set.
  • \phpDocumentor\Reflection\Middleware\Middleware its execute function is now typehinted and the result must be an object.

Bug fixes & improvements

  • Build pipeline is now in Github Actions
  • More automated tests have been added to increase coverage to 90%
4.0.0-beta

First beta release of this series. With a massive performance fix. Which reduces the parsing time with 50%.

4.0.0-alpha6

Removed:

  • addType from argument class, an argument can only have a single type. This way it is more aligned with the reflected code.
4.0.0-alpha5

Fixes an performance issue when reflected code contains large methods.

4.0.0-alpha4

Fixes an issue when file strategy returns a null value

4.0.0-alpha3
  • Added argument type resolving
  • Updated to php-parser v4
4.0.0-alpha2

bump reflection dependencies to newest alphas

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport