6.0.0
Release Notes for 6.0.0
Backwards incompatible release (major)
Notable breakages:
[BC] CHANGED: Roave\BetterReflection\Reflection\ReflectionUnionType#getTypes() now returns a non-empty-list<ReflectionNamedType|ReflectionIntersectionType>, where it previously returned list<ReflectionNamedType>
[BC] CHANGED: Roave\BetterReflection\SourceLocator\Type\StringSourceLocator::__construct() parameter type changed from string to a non-contravariant non-empty-stringallowsNull
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\ClassLoaderMethod\Exception\SignatureCheckFailed has been deleted
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\ClassLoaderMethod\FileCacheLoader has been deleted
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\ClassLoaderMethod\LoaderMethodInterface has been deleted
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\ClassLoaderMethod\EvalLoader has been deleted
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\Exception\FailedToLoadClass has been deleted
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\Exception\ClassAlreadyRegistered has been deleted
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\Exception\ClassAlreadyLoaded has been deleted
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\ClassPrinter\ClassPrinterInterface has been deleted
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\ClassPrinter\PhpParserPrinter has been deleted
[BC] REMOVED: Class Roave\BetterReflection\Util\Autoload\ClassLoader has been deleted
[BC] REMOVED: Method Roave\BetterReflection\Reflection\Adapter\ReflectionProperty#isAccessible() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionEnum#__construct() was removed
[BC] CHANGED: Method __construct() of class Roave\BetterReflection\Reflection\ReflectionEnum visibility reduced from protected to private
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionClass#__construct() was removed
[BC] CHANGED: Roave\BetterReflection\Reflection\ReflectionClass#__construct() was marked "@internal"
[BC] REMOVED: Class Roave\BetterReflection\SourceLocator\Exception\EmptyPhpSourceCode has been deleted
[BC] REMOVED: Property Roave\BetterReflection\Reflection\ReflectionType#$reflector was removed
[BC] REMOVED: Property Roave\BetterReflection\Reflection\ReflectionType#$owner was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionUnionType#__construct() was removed
[BC] CHANGED: Property Roave\BetterReflection\Reflection\ReflectionType#$reflector visibility reduced from protected to private
[BC] CHANGED: Property Roave\BetterReflection\Reflection\ReflectionType#$owner visibility reduced from protected to private
[BC] CHANGED: Roave\BetterReflection\Reflection\ReflectionUnionType#__construct() was marked "@internal"
[BC] REMOVED: Property Roave\BetterReflection\Reflection\ReflectionType#$reflector was removed
[BC] REMOVED: Property Roave\BetterReflection\Reflection\ReflectionType#$owner was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionNamedType#__construct() was removed
[BC] CHANGED: Property Roave\BetterReflection\Reflection\ReflectionType#$reflector visibility reduced from protected to private
[BC] CHANGED: Property Roave\BetterReflection\Reflection\ReflectionType#$owner visibility reduced from protected to private
[BC] CHANGED: Roave\BetterReflection\Reflection\ReflectionNamedType#__construct() was marked "@internal"
[BC] REMOVED: Property Roave\BetterReflection\Reflection\ReflectionType#$reflector was removed
[BC] REMOVED: Property Roave\BetterReflection\Reflection\ReflectionType#$owner was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionType#__construct() was removed
[BC] REMOVED: Property Roave\BetterReflection\Reflection\ReflectionType#$reflector was removed
[BC] REMOVED: Property Roave\BetterReflection\Reflection\ReflectionType#$owner was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionIntersectionType#__construct() was removed
[BC] CHANGED: Property Roave\BetterReflection\Reflection\ReflectionType#$reflector visibility reduced from protected to private
[BC] CHANGED: Property Roave\BetterReflection\Reflection\ReflectionType#$owner visibility reduced from protected to private
[BC] CHANGED: Roave\BetterReflection\Reflection\ReflectionIntersectionType#__construct() was marked "@internal"
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionEnum#__construct() was removed
[BC] CHANGED: Method __construct() of class Roave\BetterReflection\Reflection\ReflectionEnum visibility reduced from protected to private
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionClass#__construct() was removed
[BC] CHANGED: Roave\BetterReflection\Reflection\ReflectionClass#__construct() was marked "@internal"
[BC] CHANGED: The parameter $betterReflectionType of Roave\BetterReflection\Reflection\Adapter\ReflectionType::fromTypeOrNull() changed from Roave\BetterReflection\Reflection\ReflectionNamedType|Roave\BetterReflection\Reflection\ReflectionUnionType|Roave\BetterReflection\Reflection\ReflectionIntersectionType|null to Roave\BetterReflection\Reflection\ReflectionUnionType|Roave\BetterReflection\Reflection\ReflectionNamedType|Roave\BetterReflection\Reflection\ReflectionIntersectionType|null
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionParameter#isArray() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionParameter#isCallable() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionParameter#getClass() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionClass#getDeclaringNamespaceAst() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionObject#getDeclaringNamespaceAst() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionClass#getDeclaringNamespaceAst() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionParameter#getAst() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionEnumCase#getAst() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionConstant#getAst() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionProperty#getAst() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionProperty#getPositionInAst() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionProperty#__clone() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionClassConstant#getAst() was removed
[BC] REMOVED: Method Roave\BetterReflection\Reflection\ReflectionClassConstant#getPositionInAst() was removed
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionFunctionAbstract#getNamespaceName() changed from string to the non-covariant string|null
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionFunctionAbstract#getNamespaceName() changed from string to string|null
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionClass#getNamespaceName() changed from string to the non-covariant string|null
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionClass#getNamespaceName() changed from string to string|null
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionObject#getNamespaceName() changed from string to the non-covariant string|null
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionObject#getNamespaceName() changed from string to string|null
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionMethod#getNamespaceName() changed from string to the non-covariant string|null
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionMethod#getNamespaceName() changed from string to string|null
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionConstant#getNamespaceName() changed from string to the non-covariant string|null
[BC] CHANGED: The return type of Roave\BetterReflection\Reflection\ReflectionConstant#getNamespaceName() change
6.0.0
- Total issues resolved: 7
- Total pull requests resolved: 49
- Total contributors: 6
enhancement
- 1258: Fixed return type of
ReflectionClass::getDefaultProperties()
thanks to @kukulich - 1256: Detection of circular references in constant, method and property getters thanks to @herndlm
- 1252: Optimise interface traversion in
ReflectionClass
thanks to @herndlm - 1248: Increased minimum covered code mutations core to 100 % thanks to @kukulich
- 1247: Interface can have only public properties thanks to @kukulich
- 1243: Some improvements for
ReflectionClass
thanks to @kukulich - 1242: Detection of trait use circular references thanks to @herndlm
- 1241: Detection of interface extends circular references thanks to @herndlm
- 1240: Detection of circular references thanks to @kukulich and @herndlm
- 1238: Improved code coverage and mutation score thanks to @kukulich
- 1236: Improved return type of
Reflection*::getModifiers()
thanks to @kukulich - 1234: Method names, property names etc could be only
non-empty-string
thanks to @kukulich - 1225: Fixed mutation testing badge thanks to @kukulich
- 1223: Added methods to get value expression thanks to @kukulich
- 1222: Deprecate converting initializer expressions to runtime values? thanks to @ondrejmirtes
- 1221: Improved mutation score thanks to @kukulich
- 1220: Improved mutation score thanks to @kukulich
- 1215: CS:
RequireExplicitAssertion
withenableIntegerRanges=true
andenableAdvancedStringTypes=true
thanks to @kukulich - 1207: Merge release 5.11.0 into 6.0.x thanks to @github-actions[bot]
- 1199: Merge release 5.10.0 into 6.0.x thanks to @github-actions[bot]
- 1180: Merge release 5.9.0 into 6.0.x thanks to @github-actions[bot]
- 1170: Merge release 5.8.0 into 6.0.x thanks to @github-actions[bot]
- 1153: Merge release 5.7.0 into 6.0.x thanks to @github-actions[bot]
BC break,enhancement
- 1257: Less memory usage in
ReflectionMethod::withCurrentClass()
thanks to @kukulich - 1255: Mark
ReflectionClass::getMethods()
compatible with other similar getters thanks to @kukulich - 1245: Removed support for PHP4 style constructors thanks to @kukulich
- 1235: Filter parameter for methods, properties and constants is always
int-mask-of
thanks to @kukulich - 1233:
ReflectionClass::getMethod()
returns null when method does not exist thanks to @kukulich - 1231:
ReflectionClass::getConstant()
,getConstants()
andgetImmediateConstants()
more consistent with methods and properties methods thanks to @kukulich - 1230: Default PHP parser is not memoizing to prevent memory leaks thanks to @kukulich
- 1229: Removed
ReflectionClass::getAst()
to prevent memory leaks thanks to @kukulich and @ondrejmirtes - 1226: Removed
ReflectionMethod::getAst()
,getBodyAst()
,getBodyCode()
andgetReturnStatementsAst()
to prevent memory leaks thanks to @kukulich - 1224:
Reflection*::getDocComment()
returns null when no doc comment thanks to @kukulich - 1219:
Reflection*::getNamespaceName()
returns null when no namespace - namespace as empty string is implemented only in adapters thanks to @kukulich - 1218: Removed
ReflectionClassConstant::getAst()
to prevent memory leaks thanks to @kukulich and @ondrejmirtes - 1216: Removed
ReflectionProperty::getAst()
to prevent memory leaks thanks to @kukulich and @ondrejmirtes - 1214: Removed some node references to prevent memory leaks thanks to @kukulich
- 1213: Removed
ReflectionParameter::getAst()
to prevent memory leaks thanks to @kukulich - 1209:
ReflectionParameter::getClass()
,ReflectionParameter::isArray()
andReflectionParameter::isCallable()
implementations moved only to adapter thanks to @kukulich - 1198: PHP 8.2: Support for disjunctive normal form types thanks to @kukulich
- 1142: Removed deprecated
Util\Autoload
thanks to @kukulich - 1141: Removed useleses method
ReflectionProperty::isAccessible()
in adapter thanks to @kukulich - 1140: Reflection types cleanup thanks to @kukulich
- 1139:
ReflectionEnum::__construct()
can be private thanks to @kukulich - 1138:
StringSourceLocator
is forced to be built with anon-empty-string
thanks to @kukulich and @Ocramius - 981: 6.0 cleanup thanks to @kukulich
bug
- 1251: Merge release 5.11.1 into 6.0.x thanks to @github-actions[bot]
- 1246: Fixed
ReflectionNamedType::getClass()
forself
defined in trait thanks to @kukulich
bug,reflection compatibility
- 1237: Fixed adapters compatibility thanks to @kukulich
blocked,enhancement
dependencies,php
- 1228: Bump slevomat/coding-standard from 8.5.0 to 8.5.1 thanks to @dependabot[bot]
- 1227: Bump phpstan/phpstan from 1.8.5 to 1.8.6 thanks to @dependabot[bot]