Skip to content

2.0.0

Compare
Choose a tag to compare
@Ocramius Ocramius released this 18 Sep 06:34
· 2605 commits to 6.44.x since this release
2.0.0

This major release is a massive rework of the internal implementation details
of BetterReflection.

Improvements

Version 2.0.0 provides a massive performance boost when using the
new Roave\BetterReflection\BetterReflection kernel as an entry point
for using the library.

The minimum supported PHP version is now 7.1.0, which allows for
a much cleaner API definition: we added nullable hints to our own
API wherever applicable.

The compatibility with the ext-reflection
API is also almost complete, excluding some scenarios that would
forcefully require class autoloading.

Among the many new implemented features, we now support:

  • Property/Method accessors
  • Start/End line analysis for defined symbols
  • PHP 7.1 nullable types
  • PHP 7.1 iterable type declarations
  • PHP 7.2 object type declarations
  • PHP 7.1 const visibility support
  • Monkey-patching classes on the fly via hijacked autoloader
  • Immediate/inherited constants/methods/properties lookup
  • PHP 4.x constructor detection
  • Constant expression value resolution
  • Closure reflection
  • Anonymous class reflection
  • Internal class parameter default value reflection (through stubs)
  • Retrieving AST nodes for each reflection

BC Breaks

Most of the generally used API was not touched, but a lot of internal
components were completely rewritten to address design and performance
issues. Please make sure that you read
the upgrade notes.

Total issues resolved: 138