HHVM 4.2 is released! This release will be supported for 6 weeks, and HHVM 4.1 remains supported.
This is the first release on an accelerated schedule; we now aim to make new releases every monday, each supported for 6 weeks. There is no planned change to the LTS cycle.
4.1’s release branch was cut in late March, so 4.2 contains approximately a month’s changes; 4.2 and future releases do not have the same branch cut system, so 4.3 and above should be expected to contain approximately one weeks’ changes.
- Added a
statcache-clearadmin server command
- Added the
- Added context to typechecker error output; the previous output is available
$x is MyAbstractFinalClassnow raises a typechecker error, as it is impossible for any
$xto be an instance of an uninstantiable class
- The typechecker now requires an argument to
settype()function has been removed
- Static locals have been removed
- User-defined stream wrappers and filters have been removed
- Support for PHP anonymous classes have been removed from the runtime; these were not supported in Hack.
- int-like-strings are no longer converted to ints when used as PHP array
keys. To help migration, this behavior can be tested on 4.1 with the
<<__UNSAFE_Construct>>has been removed.
- The runtime now requires that all keywords (e.g.
if) to be lowercase; this was previously only required by the typechecker.
- Calls to undefined functions are now fatal errors.
filter_input_array()have been removed.
- Attempting to store a reference in
$GLOBALSwill result in a runtime error.
- Callback support has been removed from
- classes must be declared at the top level, or directly inside a namespace block. For example, they can no longer be defined conditionally, or inside a function.
- Corrected reflection for
array-like kinds are now valid
- Improved typing of
$x['foo'] ?? $barwhere
$x['foo']is not a valid field.
- Hack (and related ocaml tools) are now built using Dune instead of ocamlbuild.
make hack_testnow runs Hack’s tests; previously it built various test utilities, but did not run the tests.
- The option to have ints overflow to floats has been removed.
hhvm.hard_type_hintsoption has been removed; type-hint violations now always raise runtime errors, unless they are explicit soft type hints. This option was primarily useful for enabling stricter enforcement of parameter types for PHP5 code.
hackfmt’s handling of empty function bodies (e.g. HHI definitions). This does not affect abstract or interface methods.
- If numa is supported and not explicitly disabled, threads will always use local memory; this was previously the default in server mode only.
instanceofwill be removed, in favor of the
asoperators. It can be disabled with the
hhvm.hack.lang.phpism.disable_instanceofHHVM INI settings.