- raised minimum required PHP version to 8.2
- added new method
stubbles\reflect\annotation\Annotations::count()
so that the amount of annotations can be counted, implementing the\Countable
interface - unified behavior of
stubbles\reflect\annotationsOfConstructor()
: now always throws a\ReflectionException
when class doesn't have a constructor, independent of whether argument is a class name, an instance, or an instance of\ReflectionClass
- added more phpstan related type hints
- replace
array
in allowed values of parameters in functions withcallable
stubbles\reflect\reflect()
stubbles\reflect\annotationsOf()
stubbles\reflect\annotationsOfParameter()
stubbles\reflect\parametersOf()
stubbles\reflect\parameter()
- raised minimum required PHP version to 7.3
- fixed various potential bugs discovered by phpstan
- fixed curly brace syntax to be forward compatible with PHP 7.4
- fixed bug where indented annotation parameter names were not parsed correct
- fixed bug with
stubbles\reflect\docComment()
trying to returnfalse
when requested doc comment does not exist, resulting in a\TypeError
, now returns empty string in such cases
- raised minimum required PHP version to 7.0.0
- introduced scalar type hints and strict type checking
stubbles\reflect\annotation\Annotations::all()
now returns a\Generator
instead of anarray
- parameter annotations with empty parameter name like
@Foo{}
are now invalid and throw a\ReflectionException
- empty refined annotation types like
@Foo[]
are now invalid and throw a\ReflectionException
- improved performance for annotation parser by 100%
- provided more context in exception messages when annotation contains errors
- split off from stubbles/core
- parsing enums as annotation value is not supported any more