HHVM 4.48
HHVM 4.48 is released! This release marks the end of support for 4.42; HHVM 4.43–4.47 remain supported, as do the 4.8 and 4.32 LTS releases.
Highlights
- If a non-abstract class contains an abstract method, report the error at the
location of the class name (where the
abstract
modifier should be), instead of at the function declaration. - Some error code suppressions apply to line ranges, instead of nodes.
hackfmt
will now ignore any code in such a range, as formatting it could un-suppress errors. - If a file generated by
hack-codegen
is partially generated,hackfmt
will only format the manual sections. hackfmt
will not modify files containing@generated
.- Updated and clarified error message for private methods - now “must be public or protected”, previously (incorrectly) “Access type […] must be omitted”.
hh_client lsp --config
now accepts.hhconfig
settings, in addition tohh.conf
(system-wide) settings.- Error for uninitialized members now suggest making the property “nullable” instead of “optional”, to avoid confusion with shape terminology.
- Suggest using
$x is SomeEnum
if an exhaustive switch statement contains adefault:
block. - The CLI client/server protocol version has changed; if you have configured CLI client/server and deploy them separately, this may lead to fallback to standalone CLI mode.
Breaking Changes
- It is again an error to have a default case in exhaustive
switch ($enum)
blocks; while the enum is not enforced at runtime, we feel this behavior is better as it raises an error when the enum is expanded but switch statements are not. Note that a switch statement that does not match (no matching case, nodefault
) are still expected to throw an exception in a future release, or now with thehhvm.throw_on_non_exhaustive_switch=2
setting. HHVM_VERSION_ID
is of the formXXYYYZZ
instead ofXXYYZZ
; if you are extracting parts, please use theHHVM_VERSION_MAJOR
,HHVM_VERSION_MINOR
, andHHVM_VERSION_PATCH
constants instead.
Future Changes
- added
disable_partial
(will be renameddisable_modes
shortly) - a boolean flag that disables partial mode (and all other modes!) from Hack completely. Comments after the<?hh
are just comments, and non-hhi files are inherently strict. The default value will be false for the foreseeable future.