This repository was archived by the owner on Apr 1, 2024. It is now read-only.
v4.0.0rc1: new syntax, namespace support, modernization
This is a major new release; the most significant changes include:
- new
xhp class foosyntax, replacingclass :foo - XHP classes can be declared in namespaces
- XHP classes can be used from namespaced code - the
:character is treated as a namespace separator when instantiating classes - XHP class names are no longer mangled;
xhp class fooactually declares a runtime class calledfoo, notxhp_foo - the
childrendeclaration is no longer supported; the approach introduced with 3.1 is now required - the
categorydeclaration is no longer supported; interfaces are used instead - all classes are now namespaced, including the HTML tags
This release currently requires:
disable_xhp_element_mangling=trueandenable_xhp_class_modifier=truein.hhconfighhvm.hack.lang.enable_xhp_class_modifier=trueandhhvm.hack.lang.disable_xhp_element_mangling=truein your HHVM configuration, including when generating the autoload map, running HHAST, etc.
Before the final release, expect:
- through migration instructions
- the defaults to change in HHVM so the above configuration is no longer required; this will effectively make XHP-Lib v4 the standard XHP-Lib for new HHVM releases