HHVM 4.24.0
HHVM 4.24 is released! This release marks the end of support for 4.18; 4.19-4.23 remain supported, as do the LTS releases 3.30 and 4.8.
Highlights
- We are now building packages for Debian 10 (Buster). Debian 10 support is currently experimental, please open an issue if you notice any problems.
- Fixed a bug that could cause segfaults in JIT internals (i.e., not while executing code) on Ubuntu 19.04 (Disco Dingo).
- Parser error handling has been rewritten from OCaml to Rust. This should cause no user-facing changes, but please open an issue if you notice any problems. This can be disabled by adding
hhvm.hack.lang.hack_compiler_use_rust_parser_errorstohhvm.ini. - Fixed misleading error message when
awaitwas used on the right side of a pipe|>operator. fun()andclass_meth()can now be used inside constant expressions (this can be disabled by addingdisallow_func_ptrs_in_constants=trueto.hhconfig).
1
2
3
4
class C {
const (function(): int) FUNCTION = fun('time');
private static (function(): void) $method = class_meth('Foo', 'bar');
}
Breaking Changes
- casting to
object((object)$value) is no longer supported by the runtime (it was already a type checker error in strict mode) - the built-in function
pg_fetch_objectwas removed (usepg_fetch_associnstead) - the following built-in functions had an optional passed-by-reference parameter removed:
str_replace(usestr_replace_with_countinstead when needed)str_ireplace(usestr_ireplace_with_count)headers_sent(useheaders_sent_with_file_line)openssl_encrypt(useopenssl_encrypt_with_tag)array_multisortwas removed completely (usearray_multisort1,array_multisort2, etc. depending on the number of arguments you need to pass in—up toarray_multisort9)- use
hhast-migrate --ref-to-inoutto automatically migrate your calls
- the following built-in functions that previously had optional passed-by-reference parameters, now have non-optional
inoutparameters:- string functions:
similar_text,parse_str - multi-byte string functions:
mb_convert_variables,mb_ereg,mb_eregi,mb_parse_str - image functions:
getimagesize,exif_thumbnail - IPC functions:
msg_send,msg_receive - LDAP functions:
ldap_parse_result,ldap_control_paged_result_response - exec-family functions:
exec,passthru,system - socket functions:
fsockopen,pfsockopen,socket_server,stream_socket_accept,stream_socket_server,stream_socket_client,stream_socket_recvfrom,socket_getpeername,socket_getsockname,socket_recvfrom - network functions:
dns_get_record,dns_get_mx,getmxrr - OpenSSL functions:
openssl_random_pseudo_bytes - use
hhast-migrate --ref-to-inoutto automatically migrate your calls
- string functions:
AsyncMysqlConnectionPool::connect(): Awaitable<AsyncMysqlConnection>now declares a return type (previously untyped)hh_client --typed-full-fidelity-jsonis no longer supported (it has been producing incorrect results in most cases)
Future Changes
- The
hhvm.inioptionhhvm.hack.lang.hack_compiler_use_rust_parser_errors(see above) is expected to be removed in the next release (HHVM 4.25). - The
.hhconfigoptioncoercion_from_dynamicwill be removed soon. See documentation for detailed coercion rules for thedynamictype. - The default values for the
hhvm.inioptionshhvm.check_prop_type_hintsandhhvm.check_return_type_hintswill soon be changed to3(fatal error) and the options should be removed soon after that.