HHVM 4.155
HHVM 4.155 is released! This release marks the end of support of 4.148; 4.149 - 4.154 remain supported, as does the 4.128 LTS release.
Highlights
- Added
HHVM_COMPILER_TIMESTAMPconstant tohhifor type checker, which contains the timestamp to build hhvm. - Added narrower or pure capability declarations to the following builtin APIs:
create_opaque_valueandunwrap_opaque_valueHH\Lib\Math\to_basehash_*
- Permitted generic methods to override their own instantiations. e.g.
function foo(int):intin a super class can be overridden asfunction foo<T>(T):Tin a subclass. - Allowed multiple
--singleoptions inhh_clientinvocations. - Added a quickfix for missing awaitable type.
- Added hover docs for type aliases and contexts.
- Correctly handle negative and large integers passed to
array_fill(See CVE-2022-27809).
Breaking Changes
- Enum class label expressions now requires
defaultscapability. - Fixed an unsoundness allowing arithmetic expressions to be typed as
intwhen one of the operands is an unsolved type. - Moved all PERDIR ini settings to be SYSTEM settings.
- Deleted the runtime option
Eval.EnableZendIniCompat. - Removed the following options from HPHPc:
--force--gen-stats--sync-dir--target--program--args--include-path--branch--revision--config-dir
- HPHPc now requires a
--output-dirargument: - Fixed an unsoundness due to type parameter name clash. e.g. given
interface A<T> { function f<T1>(T $a): T1; }, ifAis implemented in a class introducing type parameter name clash asclass B<T1> extends A<T1> { function f<T1>(T1 $a): T1 { return $a; } }, when upcastingBtoA,/*A<int>*/ $a = new B<int>();, it would allow for arbitrary type convention likeStr\length($a->f(1));.