Skip to content

Releases: phpDocumentor/Reflection

6.0.0

23 May 19:56
61e2f1f
Compare
Choose a tag to compare

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: 5.3.3...6.0.0

5.3.3

09 Oct 18:25
99926d6
Compare
Choose a tag to compare

What's Changed

Full Changelog: 5.3.2...5.3.3

5.3.2

04 Oct 20:10
31b02b2
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 5.3.1...5.3.2

5.3.1

08 Dec 06:32
Compare
Choose a tag to compare

Added

  • Add support for using traits in enums by @mvriel in #301

Fixed

  • Properties declared in one statement captured default from first by @mvriel in #302
  • Constants in traits cannot be parsed by @mvriel in #305

Full Changelog: 5.3.0...5.3.1

5.3.0

14 Oct 12:43
9887ef9
Compare
Choose a tag to compare

Added

Fixed

New Contributors

Full Changelog: 5.2.0...5.3.0

5.2.0

02 Apr 20:01
936e4dd
Compare
Choose a tag to compare

Fixed

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

Added

  • #241 Add start and end file positions to method locations by @LeoVie in #243
  • Add expression evaluation for define names. by @jaapio in #245

CI

New Contributors

Full Changelog: 5.1.1...5.2.0

5.1.1

29 Mar 12:55
accb6fe
Compare
Choose a tag to compare

Fixes

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

CI

  • Bump phpdocumentor/type-resolver from 1.5.1 to 1.6.0 by @dependabot in #235
  • GH Actions: version update for various predefined actions by @jrfnl in #238

Full Changelog: 5.1.0...5.1.1

5.1.0

04 Jan 21:13
d0fcff5
Compare
Choose a tag to compare

Added

Fixed

  • PHPUnit: update configuration by @jrfnl in #214
  • GH Actions: version update for ramsey/composer-install by @jrfnl in #229
  • CS update after upstream changes by @jrfnl in #209

New Contributors

Full Changelog: 5.0.0...5.1.0

v5.0.1

08 Aug 10:15
140db68
Compare
Choose a tag to compare

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

Fixed

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

v5.0.0

01 Jul 18:12
1b70ad9
Compare
Choose a tag to compare

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