Skip to content

Releases: Roave/BetterReflection

2.0.1

01 Nov 20:51
2.0.1
9583638
Compare
Choose a tag to compare

This release fixes constraint incompatibilities with PHP 7.1.0, newer PHP 7.1.11 UConverter API
and a type error raised when attempting to fetch the AST nodes of an interface's method.

Total issues resolved: 5

2.0.0

18 Sep 06:34
2.0.0
Compare
Choose a tag to compare

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

Read more

1.2.0

26 Sep 16:23
1.2.0
Compare
Choose a tag to compare

This release introduces two new source locator classes, which are very helpful if you analyze directory trees that are not controlled by your autoloader:

  • BetterReflection\SourceLocator\Type\FileIteratorSourceLocator, which, given
    an iterator of .php files, will be able to find classes, functions, and so
    on in that set.
  • BetterReflection\SourceLocator\Type\DirectoriesSourceLocator, which, given
    a set of directories, will allow reflecting .php files in those directories.

Total issues resolved: 1

1.1.0

25 Jul 16:53
Compare
Choose a tag to compare

Summary of new features:

  • Ability to modify function, method and class structure (basic monkey patching)
  • Ability to replace the body of a function or method
  • Updated documentation
  • PHP 7 compatibility
  • Some PHP 7.1 compatibility (more features will come in a future version!)
  • Implemented ::class constant resolution
  • FindReflectionOnLine helper (look up code unit by filename and line number)
  • Various other improvements and bugfixes

Total issues resolved: 39

1.0.1

16 Feb 10:25
Compare
Choose a tag to compare

1.0.0

0.1.0

02 Nov 22:03
0.1.0
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release

Total issues resolved: 107