This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
Releases: spaceonfire/type
Releases · spaceonfire/type
1.3.1
1.3.0
Added
- 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
- Fixed string representation of collection type with complex value type.
1.2.0
Removed
Type
interface doesn't declare static methodssupport()
andcreate()
no more.
Added
- Dynamic type factories. It replaces static methods in
Type
classes and staticTypeFactory
class. - Mixed type.
- Void type.
Deprecated
- 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.
1.1.0
Added
- Support non strict mode for all scalar types (int, float, string and bool)
- Force return
null
when casting to null builtin type
1.0.1
Fixed
- Development config updates
- Minor type issues fixes found by static analyser
First release
1.0.0 feat(type): add types