Skip to content

Releases: brick/reflection

0.5.4

10 May 17:33
Compare
Choose a tag to compare

Compatibility improvements

  • Compatibility with brick/varexporter version 0.5

0.5.3

03 May 21:01
Compare
Choose a tag to compare

New features

  • Support for ReflectionClassConstant as Reflector in ImportResolver

0.5.2

02 May 20:45
Compare
Choose a tag to compare

Compatibility improvements

  • Compatibility with brick/varexporter version 0.4
  • Compatibility with doctrine/annotations version 2.x

0.5.1

15 Jan 23:23
Compare
Choose a tag to compare

New features

  • Support for PHP 8.2 DNF types in ReflectionTools::exportFunctionSignature()

0.5.0

15 Jan 14:34
Compare
Choose a tag to compare

💥 Breaking changes

  • Minimum PHP version is now 8.0
  • The following methods have been removed:
    • ReflectionTools::getParameterTypes()
    • ReflectionTools::getPropertyTypes()
  • ReflectionTools::exportFunction() has been renamed to exportFunctionSignature()
  • ReflectionTools::exportFunctionParameters() is no longer part of the public API

New features

  • ReflectionTools::exportFunctionSignature():
    • Support for self, static and never types
    • Support for union types and intersection types
    • Support for functions returning references

🐛 Bug fixes

  • ReflectionTools::exportFunctionSignature():
    • constants are now properly exported with a leading \
    • nullable types are now always output with a leading ?

💄 Cosmetic changes

  • ReflectionTools::exportFunctionSignature():
    • Null values in parameter default values are now output as null instead of NULL
    • Arrays in parameter default values are now exported with short array syntax, on a single line
    • There is no more space between closing parenthesis and colon, i.e. ): int instead of ) : int

0.4.1

24 Oct 20:06
Compare
Choose a tag to compare

🐛 Bug fix

  • ReflectionTools::exportFunction() returned a ?-nullable type for untyped parameters (#2)

0.4.0

28 Sep 22:32
Compare
Choose a tag to compare

New features

  • PHP 8 compatibility 🚀
  • ReflectionTools::getPropertyTypes() now supports PHP 8 union types
  • ReflectionTools::getParameterTypes() now supports reflection & PHP 8 union types

💥 Breaking changes

  • ReflectionTools::getParameterTypes() now reads types from reflection first
  • ReflectionTools::getPropertyTypes() and getParameterTypes():
    • always return class names as FQCN (including namespace)
    • always return built-in types as lowercase
  • ReflectionTools::getFunctionParameterTypes() has been removed
  • ReflectionTools::getPropertyClass() has been removed

⬆️ Dependency upgrade

  • For compatibility with PHP 8, this version requires doctrine/annotations: ^1.10.4

0.3.0

24 Dec 14:54
Compare
Choose a tag to compare

Minimum PHP version is now 7.2. No other changes.

0.2.4

05 Nov 18:46
Compare
Choose a tag to compare

Fix support for typed properties in ReflectionTools::getPropertyClass().

0.2.3

05 Nov 14:13
Compare
Choose a tag to compare

Support for typed properties (PHP 7.4) in ReflectionTools::getPropertyTypes().