Skip to content

Releases: Roave/BetterReflection

3.2.0

07 Dec 15:27
3.2.0
f54261a
Compare
Choose a tag to compare

This release introduces PHP 7.3 support, reduces the exported package size,
and improves the overall code quality of the package through updated coding
style conventions.

Total issues resolved: 6

3.1.1

31 Jul 07:00
3.1.1
c022c6c
Compare
Choose a tag to compare

This release fixes an incompatibility between ext-reflection
and roave/better-reflection in which ReflectionClass#getConstructor()
led to an exception rather than a null return value in case of
constructors being missing.

Total issues resolved: 1

3.1.0

23 Jul 20:23
3.1.0
ca0298b
Compare
Choose a tag to compare

This release hardens the AutoloadSourceLocator to allow for multiple PSR-4
paths to be crawled for class existence.

Also, it is now possible to alter reflection instances to set the function/method
docBlocks while monkey-patching code.

Total issues resolved: 7

3.0.0

26 May 12:51
3.0.0
Compare
Choose a tag to compare

This release improves the performance and reliability of the library, which is now
fully working with PHP 7.2 and newer nikic/php-parser releases.

Some BC breaks had to be performed:

Total issues resolved: 23

2.0.2

05 Feb 08:15
2.0.2
Compare
Choose a tag to compare

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