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
inout
parameters - 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_password
INI setting.
Breaking Changes
- Fix variance checks for
where
constraints 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 aswitch
but 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
$GLOBALS
without 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
inout
parameters; in many cases this is just a change to the calling convention, however there are more significant changes, due toinout
parameters not permitting default values; in particular:Memcache::get()
andmemcache_get()
no longer take a&$flags
parameter; this parameter previously had no effect in HHVM.preg_replace_callback()
no longer has an optional$count
parameter; callpreg_replace_callback_with_count()
if a count is required.- the
$position
parameter forNumberFormatter::parseCurrency()
is no longer optional - the
$isSystemID
parameter forIntlTimeZone::getCanonicalID()
is no longer optional - the
$issuesFound
parameters 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&$info
parameter
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_server
with--config symbolindex_search_provider=SqliteIndex
- The optional
&$cas_token
parameters for various memcached functions will be removed; we recommend moving to theinout
versions of these functions. - The optional
&$position
parameters 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.