Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Reflection Laravel Package

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.

View on GitHub
Deep Wiki
Context7
0.7.1
  • Compatibility with brick/varexporter versions 0.6 and 0.7 (#6 by @jorisvaesen)
0.7.0

💥 Breaking changes

  • classes ReflectionTools and ImportResolver are now final

Improvements

  • removed dependency on abandoned doctrine/annotations library
0.6.0

💥 Breaking changes

  • Minimum PHP version is now 8.1
0.5.4

Compatibility improvements

  • Compatibility with brick/varexporter version 0.5
0.5.3

New features

  • Support for ReflectionClassConstant as Reflector in ImportResolver
0.5.2

Compatibility improvements

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

New features

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

💥 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

🐛 Bug fix

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

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

Minimum PHP version is now 7.2. No other changes.

0.2.4

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

0.2.3

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

0.2.2

Improvement

ReflectionTools::getClassMethods() and getClassProperties() now always respect the hierarchical order, returning methods and properties from parent classes first.

0.2.1

Internal refactoring. Several methods now have a simpler implementation.

0.2.0

Minimum PHP version is now 7.1.

ReflectionTools::exportFunction() now supports scalar type hints, return types, nullable types and variadics.

0.1.0

First beta release.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky