- Merged PR #43: Add support for asymmetric visibility for properties, see https://wiki.php.net/rfc/asymmetric-visibility-v2, targeted for PHP 8.4. (@thekid)
- Merged PR #41: Add
lang.reflection.Type::declaredName()
which returns the class name without the namespace, if any (@thekid) - Merged PR #40: Add support for the global package, fixing issue #39 (@thekid)
- Merged PR #38: Remove context from properties, methods, constructors and initializers (@thekid)
- Made this library compatible with XP 12, droppping support for all but the latest PHP 7 version. Minimum PHP version required is now 7.4! (@thekid)
- Backport PR #43, asymmetric visibility for properties - @thekid
- Backport PR #41,
lang.reflection.Type::declaredName()
- @thekid
- Fixed
FromAttributes::imports()
for classes created insideeval
(@thekid)
- Added support for partial meta information - @thekid
- Fixed missing
xp::$sn
lookup when reflecting generics - @thekid
- Fixed parameter default values, by-reference and variadic markers, and parameter and return types being swallowed for functions inside annotations when using PHP 7 (@thekid)
- Fixed parsing global imports and grouped imports containing aliases,
which surfaced as either Syntax error, unexpected token
as
or Cannot use object of type PhpToken as array errors (@thekid)
- Fixed
lang.reflection.Constant::modifiers()
return type - @thekid
- Fixed reading and writing non-public virtual properties - @thekid
- Fixed parsing arrow functions inside arrays - @thekid
- Merged PR #36: Make Type, Member and Parameter classes implement the
lang.reflection.Annotated
interface (@thekid) - Fixed value to argument mapping for parameter annotations - @thekid
- Merged PR #35: Add support for multiple arguments using arrays in eval (@thekid)
- Merged PR #32: Add support for class constants types. For this PHP 8.3, see https://wiki.php.net/rfc/typed_class_constants (@thekid)
- Fixed issue #33: Undefined index: class@anonymous - @thekid
- Merged PR #31: Add forward compatibility with xp-framework/ast - @thekid
- Merged PR #30: Migrate to new testing library - @thekid
- Fixed function expressions inside annotations in PHP 7.x - @thekid
- Fixed handling reflection on generics in PHP 7.x - @thekid
- Merged PR #29: Add
lang.reflection.CannotInstantiate::type()
accessor (@thekid)
- Merged PR #27: Fix ambiguous annotation values by checking an additional flag, see https://github.com/xp-framework/compiler/releases/tag/v8.8.1 (@thekid)
- Merged PR #26: Invocation exceptions consistency - @thekid
- Merged PR #25: Add
Annotations::all()
with returns all annotations of a given type (or subtype). (@thekid)
- Merged PR #24: Add support for named annotation arguments in PHP 7 (@thekid)
- Fixed parsing arrow functions (
fn() => E
) in annotations - @thekid - Merged PR #23: Add Reflection::type() to return type instances - @thekid
- Fixed compatibility with
xp-framework/ast
version 9+ - @thekid
- Merged PR #22: Include type constants in xp reflect output - @thekid
- Merged PR #21: Support
readonly
modifier on classes. Implements 8.2 feature suggested in #20, see https://wiki.php.net/rfc/readonly_classes (@thekid)
- Merged PR #19: Include type modifiers in ordering - @thekid
- Merged PR #18: Also accept directories on command line - @thekid
- Fixed #17: Call to undefined method WithHighlighting::writeLinef() (@thekid)
- Changed (named) argument handling to be consistent during method
invocations. Missing or incorrectly typed arguments now raise
lang.reflection.CannotInvoke
in all PHP versions 7.0...8.2 (@thekid) - Made this library compatible with
xp-framework/ast
version 8.0 (@thekid) - Fixed
lang.reflection.Parameter::default()
to parse parameter annotations correctly (@thekid)
- Fixed excess named arguments not raising exceptions in PHP 7 - @thekid
- Merged PR #16: Add support for named arguments in PHP 7 - @thekid
- Made library compatible with XP 11 - @thekid
- Merged PR #14: Implement PHP 8.1 readonly properties - @thekid
- Added support for PHP 8.1 intersection types, implementing #12. See https://wiki.php.net/rfc/pure-intersection-types (@thekid)
- Fixed
Method::invoke()
,Property::get()
andProperty::set()
not raising exceptions in PHP 8.1, an incompatibility created by the RFC https://wiki.php.net/rfc/make-reflection-setaccessible-no-op (@thekid) - Fixed warnings in PHP 8.1 about
getIterator()
compatibility, see https://wiki.php.net/rfc/internal_method_return_types (@thekid) - Added support for reflection on native types, e.g. the
Countable
interface or theDOMDocument
class (@thekid)
- Merged PR #11: Add support for
never
return type - @thekid
- Merged PR #10: Support PHP 8.1 native enums - @thekid
- Added support for reflective access to non-constant expressions for parameter defaults, see xp-framework/compiler#104 (@thekid)
- Merged PR #8 and PR #9, adding
Parameters::accept()
to check whether given arguments would be accepted (@thekid) - Added support for
@var
for properties (and kept@type
for BC), see https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/var.html (@thekid) - Merged PR #7: Add Parameters::at() and Parameters::named() - @thekid
- Merged PR #6: Implement Type::initializer() for custom instantiation, implementing usecases suggested in #5 (@thekid)
- Fixed issue #4: Class loader is null when using backslashes - @thekid
- Merged PR #3: Add reflection on packages (a.k.a. namespaces) - @thekid
- Added
native
modifier to internal classes - @thekid
- Wrapped exceptions from
closure()
inlang.IllegalArgumentException
(@thekid) - Fixed method string representation when using PHP 8 native union types (@thekid)
- Included type in
lang.reflection.Property
's string representation (@thekid) - Added support for showing type documentation and members' purpose (its
documentation's first sentence) by passing the
-d
/--doc
flag to thexp reflect
subcommand. (@thekid) - Added
comment()
accessor toType
andMember
classes, returning their respective api doc commments without/
and*
s, if any. (@thekid) - Added support for including private and protected members by passing
the
-a
/--all
flag to thexp reflect
subcommand. (@thekid)
- Added
lang.reflection.Type::traits()
to enumerate used traits. (@thekid) - Added
lang.reflection.Type::interfaces()
to enumerate implemented interfaces of a class or interface parents, respectively. (@thekid)
- Added method
lang.reflection.Parameters::size()
which returns number of parameters (@thekid) - Changed
Reflection::of()
to raiselang.ClassNotFoundException
when a type name is passed as a string and loading the type fails. (@thekid)
- Added
lang.reflection.Methods::annotated()
method to enumerate all methods with a given annotation (@thekid) - Merged PR #2: Use meta information (not only for annotations, but also for properties as well as method return and parameter types) (@thekid)
- Fixed accessing meta data for type members via
xp::$meta
cache (@thekid)
- Passed property to
AccessingFailed
andCannotAccess
exceptions, and make it accessible via theirtarget()
method (@thekid) - Made
Reflection::of()
also acceptlang.reflection.Type
instances (@thekid) - Added
compoundName()
accessor to constants, properties and methods (@thekid) - Passed method or constructor to
InvocationFailed
andCannotInvoke
exceptions, and make it accessible via theirtarget()
method (@thekid)
- Removed lookup for lowercase XP annotations, the AST library does not support them any longer (@thekid)
- Added
lang.reflection.Annotation::newInstance()
method - @thekid
- Fixed syntax error when using type annotations with
eval
argument (@thekid)
- Added
lang.reflection.Method::closure()
- @thekid - Implemented context type check when reading and writing properties as well as when invoking methods and constructors (@thekid)
- Changed code to attribute reflection instead of parsing the code in PHP 8 - @thekid
- Fixed
Type
class to consistently raise CannotInstantiate exceptions for interfaces and abstract classes (@thekid)
- Hello World! First release - @thekid