brick/reflection
Low-level PHP 8.1+ helpers extending native reflection. ReflectionTools can list all instance methods/properties across inheritance (including private parents), get class hierarchies, and create reflections for any callable with meaningful function names.
brick/varexporter versions 0.6 and 0.7 (#6 by @jorisvaesen)💥 Breaking changes
ReflectionTools and ImportResolver are now final✨ Improvements
doctrine/annotations library💥 Breaking changes
8.1✨ Compatibility improvements
brick/varexporter version 0.5✨ New features
ReflectionClassConstant as Reflector in ImportResolver✨ Compatibility improvements
brick/varexporter version 0.4doctrine/annotations version 2.x✨ New features
ReflectionTools::exportFunctionSignature()💥 Breaking changes
8.0ReflectionTools::getParameterTypes()ReflectionTools::getPropertyTypes()ReflectionTools::exportFunction() has been renamed to exportFunctionSignature()ReflectionTools::exportFunctionParameters() is no longer part of the public API✨ New features
ReflectionTools::exportFunctionSignature():
self, static and never types🐛 Bug fixes
ReflectionTools::exportFunctionSignature():
\?💄 Cosmetic changes
ReflectionTools::exportFunctionSignature():
null instead of NULL): int instead of ) : int🐛 Bug fix
ReflectionTools::exportFunction() returned a ?-nullable type for untyped parameters (#2)✨ New features
ReflectionTools::getPropertyTypes() now supports PHP 8 union typesReflectionTools::getParameterTypes() now supports reflection & PHP 8 union types💥 Breaking changes
ReflectionTools::getParameterTypes() now reads types from reflection firstReflectionTools::getPropertyTypes() and getParameterTypes():
ReflectionTools::getFunctionParameterTypes() has been removedReflectionTools::getPropertyClass() has been removed⬆️ Dependency upgrade
doctrine/annotations: ^1.10.4Minimum PHP version is now 7.2. No other changes.
Fix support for typed properties in ReflectionTools::getPropertyClass().
Support for typed properties (PHP 7.4) in ReflectionTools::getPropertyTypes().
Improvement
ReflectionTools::getClassMethods() and getClassProperties() now always respect the hierarchical order, returning methods and properties from parent classes first.
Internal refactoring. Several methods now have a simpler implementation.
Minimum PHP version is now 7.1.
ReflectionTools::exportFunction() now supports scalar type hints, return types, nullable types and variadics.
First beta release.
How can I help you explore Laravel packages today?