HHVM 4.23.0
HHVM 4.23 is released! This release marks the end of support for 4.17; 4.18-4.22 remain supported, as do the LTS releases 3.30 and 4.8.
Highlights
- fixed runtime error calling static methods with reified generics on dynamic
class names, e.g.
$class::foo<int>() - clearer typechecker error messages for invalid method and property access
- clearer runtime error when calling an undefined method with
inoutparameters - if the admin server is enabled with a password, it is now possible to allow
access to statistics without the password with the
hhvm.admin_server.stats_need_passwordINI setting.
Breaking Changes
- Fix variance checks for
whereconstraints with generics - It is now a typechecker error to have multiple
default:cases in aswitch; this was previously a runtime error - A typechecker error is now raised if a
default:case is present in aswitchbut is not the last case. - Deleted temporary APIs for reified generics:
HH\ReifiedGenerics\getTypeStructure(): useHH\ReifiedGenerics\get_type_structure()insteadHH\ReifiedGenerics\getClassname(): useHH\ReifiedGenerics\get_classname()instead
- Accessing
$GLOBALSwithout a subcript is now a parse error. UseHH\global_keys()instead if you need to enumarate the full list. - The XML, memcache, memcached, and PCRE extensions have been migrated from
taking parameters by reference to taking
inoutparameters; in many cases this is just a change to the calling convention, however there are more significant changes, due toinoutparameters not permitting default values; in particular:Memcache::get()andmemcache_get()no longer take a&$flagsparameter; this parameter previously had no effect in HHVM.preg_replace_callback()no longer has an optional$countparameter; callpreg_replace_callback_with_count()if a count is required.- the
$positionparameter forNumberFormatter::parseCurrency()is no longer optional - the
$isSystemIDparameter forIntlTimeZone::getCanonicalID()is no longer optional - the
$issuesFoundparameters forSpoofChecker::areConfusable()andSpoofChecker::isSuspicious()are no longer optional - the
ereg()anderegi()functions have been removed - the
array_walk()andarray_walk_recursive()functions have been removed idn_to_ascii(),idn_to_utf8(), andidn_to_unicode()no longer take an optional&$infoparameter
hhast-migrate --ref-to-inout can be used to
automatically migrate many of these cases.
Future Changes
- We will shortly be switching to an improved implementation of autocomplete
for editors that use LSP, such as Visual Studio Code or Vim with ALE. This
can be trialled now by starting
hh_serverwith--config symbolindex_search_provider=SqliteIndex - The optional
&$cas_tokenparameters for various memcached functions will be removed; we recommend moving to theinoutversions of these functions. - The optional
&$positionparameters forNumberFormatter::parse()andIntlDateFormatter::parse()will be removed; use::parseWithPosition()instead. - The following functions and methods that depend on references will be removed:
call_user_method()call_user_method_array()PDO::bindParam()PDO::bindColumn()SQLite3::bindparam()
hhast-migrate --ref-to-inout can be used to
automatically migrate many of these cases.