Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
/ type Public archive
generated from spaceonfire/skeleton

Releases: spaceonfire/type

1.3.1

16 Feb 17:18
Compare
Choose a tag to compare

Added

  • Support installation on PHP 8

1.3.0

17 Oct 17:58
3b15ca3
Compare
Choose a tag to compare

Added

  • Lot of improvements for DisjunctionType and ConjunctionType:
    • 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.
  • DisjunctionTypeFactory and ConjunctionTypeFactory also improved:
    • General code moved to AbstractAggregatedTypeFactory class;
    • They can now parse complex type strings, such as: int|string|array<bool|int>|string|null.
  • GroupTypeFactory allows parsing grouped with () type strings like: (string|int)[]
  • MemoizedTypeFactory allows cache results of calls to supports() and make().
    Recommend wrap type factory with memoized decorator in production.

Fixed

  • Fixed string representation of collection type with complex value type.

1.2.0

13 Oct 17:49
e167eb7
Compare
Choose a tag to compare

Removed

  • Type interface doesn't declare static methods support() and create() no more.

Added

  • Dynamic type factories. It replaces static methods in Type classes and static TypeFactory class.
  • Mixed type.
  • Void type.

Deprecated

  • Static methods in classes implementing Type interface and static TypeFactory class marked as deprecated.
    Their API still backward compatible using dynamic type factories. It will be removed in next major release.

1.1.0

04 Oct 08:19
245bde0
Compare
Choose a tag to compare

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

26 Sep 18:13
2a226c2
Compare
Choose a tag to compare

Fixed

  • Development config updates
  • Minor type issues fixes found by static analyser

First release

01 Jun 15:18
e467f15
Compare
Choose a tag to compare
1.0.0

feat(type): add types