Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Require HHVM 3.24, support call-time-pass-by-reference migration

Pre-release
Pre-release
Compare
Choose a tag to compare
@fredemmott fredemmott released this 16 Jan 18:57
71f2ce1

This release adds support for - and requires - HHVM 3.24. HHVM 3.23 and below are no longer supported due to changes in the AST.

This release also adds support for migrating code to use call-time-pass-by-reference, which is required in HHVM 3.24.

To do so:

  • checkout the project that needs migrating
  • run hh_client
  • checkout HHAST
  • run bin/hhast-migrate --ctpbr path/to/your/source/

For example:

$ bin/hhast-migrate --ctpbr $HOME/code/fbmarkdown/src/
$ cd $HOME/code/fbmarkdown/src/
$ git diff
diff --git a/src/_Private/decode_html_entity.php b/src/_Private/decode_html_entity.php
index 7891b57..a44b441 100644
--- a/src/_Private/decode_html_entity.php
+++ b/src/_Private/decode_html_entity.php
@@ -25,7 +25,7 @@ function decode_html_entity(string $string): ?(string, string, string) {
     \preg_match(
       '/^&(#[0-9]{1,8}|#X[0-9a-f]{1,8}|[a-z][a-z0-9]*);/i',
       $string,
-      $matches,
+      &$matches,
     ) !== 1
   ) {
     return null;
...