Autoload classes, functions, enums, constants, and typedefs on HHVM
This release removes usage of static locals, which will be unsupported in 4.1
This release fixes compatibility with nightly builds, by replacing <?hh
with <?hh // partial
This will be required in 4.1
This release is intended for users of HHVM 3.30; users of HHVM 4 should use hhvm-autoload v2.x. This release:
Composer now needs to execute the autoloader in a subprocess; this worked, but was not updated for the move to .hack
files.
In this release:
.hack
files are supportedvendor/autoload.hack
is now generated; the preferred usage is to require()
this file, then call Facebook\AutoloadMap\initialize()
; hh_autoload.hh
and hh_autoload.php
are still generated for compatibility, but heavily discouraged.hh-autoload
executable is now a shell script that launches hh-autoload.hack
; either execute vendor/bin/hh-autoload
without specifying an interpreter, or hhvm vendor/bin/hh-autoload.hack
Writer:::writeToFile()
will now write just to the file specified. Writer::writeToDirectory()
should be used to also generate the backwards-compatibility files.This release:
<?hh
instead of <?php
In theory, this is fully compatible - however I've bumped the minor version as the removal of the HHI does mean that your project will have type errors until the autoload map is generated, if your project reads generated data (e.g. Facebook\AutolaodMap\Generated\is_dev()
)