All notable changes to type
will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
Interface
suffix added to type interface.
- First release from monorepo.
- Support installation on PHP 8
- Lot of improvements for
DisjunctionType
andConjunctionType
:- General code moved to
AbstractAggregatedType
class; - They can be iterated over now;
- They can be merged with other aggregated types using late static binding;
- Duplicates auto removed from given subtypes;
- At least 2 subtypes required.
- General code moved to
DisjunctionTypeFactory
andConjunctionTypeFactory
also improved:- General code moved to
AbstractAggregatedTypeFactory
class; - They can now parse complex type strings, such as:
int|string|array<bool|int>|string|null
.
- General code moved to
GroupTypeFactory
allows parsing grouped with()
type strings like:(string|int)[]
MemoizedTypeFactory
allows cache results of calls tosupports()
andmake()
. Recommend wrap type factory with memoized decorator in production.
- Fixed string representation of collection type with complex value type.
Type
interface doesn't declare static methodssupport()
andcreate()
no more.
- Dynamic type factories. It replaces static methods in
Type
classes and staticTypeFactory
class. - Mixed type.
- Void type.
- Static methods in classes implementing
Type
interface and staticTypeFactory
class marked as deprecated. Their API still backward compatible using dynamic type factories. It will be removed in next major release.
- Support non strict mode for all scalar types (int, float, string and bool)
- Force return
null
when casting to null builtin type
- Development config updates
- Minor type issues fixes found by static analyser
- First release