Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Releases: hhvm/type-assert

v4.2.2: support `dynamic` and coercing scientific notation with negative exponents (e.g. `3e-1`) to floats

13 Sep 15:50
Compare
Choose a tag to compare

v4.2.1: support HHVM 4.117

07 Jul 18:19
8c90780
Compare
Choose a tag to compare

Requires HHVM 4.115 or newer.

v4.2.0: support current nightly builds

11 Dec 21:52
Compare
Choose a tag to compare

This version:

  • adds support for current nightly builds of HHVM, and is expected to support HHVM 4.88
  • requires HHVM 4.80 or newer

4.1.2: support HHVM 4.71+

17 Aug 19:34
0983260
Compare
Choose a tag to compare
  • replace all is_array() calls

4.1.1: support recent HHVM releases

29 Jul 19:52
5a3f382
Compare
Choose a tag to compare
  • requires HHVM 4.64
  • migrate array type annotations to varray or darray (required since HHVM 4.68)
  • avoids a warning raised when using TypeSpec\enum in HHVM 4.68+

v4.1.0: support and require HHVM 4.63, array changes

23 Jun 18:11
Compare
Choose a tag to compare

This release:

  • requires HHVM 4.63
  • improves varray_or_darray() handling to return varrays in more cases, such as when coercing from a vec, instead of all coercions resulting in a darray; this is as 4.63 considers varray and darray to be distinct types
  • removes PHP array support; it's not practical to support these on HHVM 4.63, and array() literals will shortly be removed from the language

4.0.0: remove support for dict-like-`array` and vec-like-`array`

20 May 18:55
3aa45a5
Compare
Choose a tag to compare

Use the explicit darray or varray conversions instead.

  • Reified or type-structure-based operations will now explicitly return a darray or varray instead of a PHP array.
  • Untyped arrays will now be considered varray_or_darray<mixed>

Add `TypeSpec\of<reify T>()`

13 Jan 21:57
Compare
Choose a tag to compare
v3.7.3

remove new public type structure functions

Support `varray<T>`, `darray<Tk, Tv>`, `varray_or_darray<T>` in TypeSpec and type structure/reified assertions/coercions

10 Jan 19:40
Compare
Choose a tag to compare

This release adds:

  • TypeSpec\varray()
  • TypeSpec\darray()
  • TypeSpec\varray_or_darray()
  • Support for these types to TypeAssert\matches_type_structure() and TypeAssert\matches<reify T>(), and the corresponding coercion functions

Add `TypeSpec::toString()`, small improvements

09 Jan 21:48
e02ad70
Compare
Choose a tag to compare

This release:

  • adds TypeSpec::toString(), which is intended to return the type as valid code - e.g. TypeSpec\string()->toString() returns 'string'
  • makes Hack Collection coercions return the original value if the original value is valid, instead of returning a new object with the same elements
  • improved and more performant error traces for Hack Collections