This repository was archived by the owner on Sep 1, 2023. It is now read-only.
Releases: hhvm/type-assert
Releases · hhvm/type-assert
v4.2.2: support `dynamic` and coercing scientific notation with negative exponents (e.g. `3e-1`) to floats
v4.2.1: support HHVM 4.117
Requires HHVM 4.115 or newer.
v4.2.0: support current nightly builds
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+
- replace all
is_array()
calls
4.1.1: support recent HHVM releases
- requires HHVM 4.64
- migrate
array
type annotations tovarray
ordarray
(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
This release:
- requires HHVM 4.63
- improves
varray_or_darray()
handling to returnvarray
s in more cases, such as when coercing from avec
, instead of all coercions resulting in adarray
; 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`
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>()`
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
This release adds:
TypeSpec\varray()
TypeSpec\darray()
TypeSpec\varray_or_darray()
- Support for these types to
TypeAssert\matches_type_structure()
andTypeAssert\matches<reify T>()
, and the corresponding coercion functions
Add `TypeSpec::toString()`, small improvements
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