All notable changes are documented in this file using the Keep a CHANGELOG principles.
5.0.0 - 2024-02-02
- This component is no longer supported on PHP 8.1
4.0.0 - 2023-02-03
- This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0
3.2.1 - 2023-02-03
- #28: Potential undefined offset warning/notice
3.2.0 - 2022-09-12
- #25: Support Disjunctive Normal Form types
- Added
ReflectionMapper::fromParameterTypes()
- Added
IntersectionType::types()
andUnionType::types()
- Added
UnionType::containsIntersectionTypes()
3.1.0 - 2022-08-29
- #21: Support
true
as stand-alone type
3.0.0 - 2022-03-15
- Support for intersection types introduced in PHP 8.1
- Support for the
never
return type introduced in PHP 8.1 - Added
Type::isCallable()
,Type::isGenericObject()
,Type::isIterable()
,Type::isMixed()
,Type::isNever()
,Type::isNull()
,Type::isObject()
,Type::isSimple()
,Type::isStatic()
,Type::isUnion()
,Type::isUnknown()
, andType::isVoid()
- Renamed
ReflectionMapper::fromMethodReturnType(ReflectionMethod $method)
toReflectionMapper::fromReturnType(ReflectionFunctionAbstract $functionOrMethod)
- Removed
Type::getReturnTypeDeclaration()
(useType::asString()
instead and prefix its result with': '
) - Removed
TypeName::getNamespaceName()
(useTypeName::namespaceName()
instead) - Removed
TypeName::getSimpleName()
(useTypeName::simpleName()
instead) - Removed
TypeName::getQualifiedName()
(useTypeName::qualifiedName()
instead)
2.3.4 - 2021-06-15
- Fixed regression introduced in 2.3.3
2.3.3 - 2021-06-15 [YANKED]
- #15: "false" pseudo type is not handled properly
2.3.2 - 2021-06-04
- Fixed handling of tentatively declared return types
2.3.1 - 2020-10-26
SebastianBergmann\Type\Exception
now correctly extends\Throwable
2.3.0 - 2020-10-06
- #14: Support for
static
return type that is introduced in PHP 8
2.2.2 - 2020-09-28
- Changed PHP version constraint in
composer.json
from^7.3 || ^8.0
to>=7.3
2.2.1 - 2020-07-05
- Fixed handling of
mixed
type inReflectionMapper::fromMethodReturnType()
2.2.0 - 2020-07-05
- Added
MixedType
object for representing PHP 8'smixed
type
2.1.1 - 2020-06-26
- This component is now supported on PHP 8
2.1.0 - 2020-06-01
- Added
UnionType
object for representing PHP 8's Union Types - Added
ReflectionMapper::fromMethodReturnType()
for mapping\ReflectionMethod::getReturnType()
to aType
object - Added
Type::name()
for retrieving the name of a type - Added
Type::asString()
for retrieving a textual representation of a type
- Deprecated
Type::getReturnTypeDeclaration()
(useType::asString()
instead and prefix its result with': '
) - Deprecated
TypeName::getNamespaceName()
(useTypeName::namespaceName()
instead) - Deprecated
TypeName::getSimpleName()
(useTypeName::simpleName()
instead) - Deprecated
TypeName::getQualifiedName()
(useTypeName::qualifiedName()
instead)
2.0.0 - 2020-02-07
- This component is no longer supported on PHP 7.2
1.1.3 - 2019-07-02
- Fixed class name comparison in
ObjectType
to be case-insensitive
1.1.2 - 2019-06-19
- Fixed handling of
object
type
1.1.1 - 2019-06-08
- Fixed autoloading of
callback_function.php
fixture file
1.1.0 - 2019-06-07
- Added support for
callable
type - Added support for
iterable
type
1.0.0 - 2019-06-06
- Initial release based on code contributed by Michel Hartmann to PHPUnit