HHVM 4.73 is released! This release marks the end of support for 4.66; HHVM 4.67–4.72 remain supported, as do the 4.32 and 4.56 LTS releases.

Highlights

  • Support for using XHP classes (elements) with namespaces is now enabled by default. This comes with many related XHP changes.
    • See separate blog post for a detailed list of changes. Most important breaking changes are also listed below.
    • See setup instructions for how to enable this in previous HHVM versions or disable it in HHVM 4.73.
    • These changes are incompatible with xhp-lib v3. Hack projects must upgrade to xhp-lib v4 to use XHP with namespaces.
    • Automated migrations for all language changes and from xhp-lib v3 to v4 are available in HHAST 4.64.6 or newer.
  • Various improvements to the new hh_client error formatter.

Breaking Changes

  • Related to XHP namespace support:
    • Syntax changed from class :foo to xhp class foo.
    • Name mangling is no longer used, xhp class foo now declares a class named foo, not xhp_foo. This can cause new naming conflicts, and can also cause issues anywhere the old mangled class names are passed around as strings.
    • - is no longer allowed inside XHP class names.
    • : is now a namespace separator, class foo:bar declares a class named bar in the foo sub-namespace of the current namespace (namespace\foo\bar).
    • The category %foo, %bar syntax is no longer supported.
    • The children (...) syntax is not supported by xhp-lib v4, we recommend disabling it in the typechecker by adding disable_xhp_children_declarations=true to .hhconfig.
  • The built-in functions current(), key(), reset() and end() were removed. This continues the previously announced removal of arrays’ built-in “internal iterators”.
  • Using the built-in function \HH\global_keys() now raises a typechecker error. It had already been removed from the runtime, but was incorrectly still accepted by the typechecker.
  • Declaring a non-static variable (property) in an abstract final class is now a typechecker error. It had already been a runtime error.
  • The INI option hhvm.dynamic_invoke_functions has been removed. This option allowed specifying a list of functions that could be used with fb_intercept or fb_rename_function in repo-authoritative mode. It’s no longer possible to control this per-function, but it can still be controlled globally using hhvm.jit_enable_rename_function.
  • The INI option hhvm.use_repo_autoload_map has been removed (preserving default true). The built-in autoload map is now always used in repo-authoritative mode.