From ef4a4b1d59c6e3d7ea105775f7fd0d0f8ed3fd00 Mon Sep 17 00:00:00 2001 From: Lexidor Digital <31805625+lexidor@users.noreply.github.com> Date: Tue, 21 Jan 2020 22:37:59 +0100 Subject: [PATCH] Backport Ref to 3.30 (#113) * Backport Ref to 3.30 * Remove hhvm-nightly from the tests HHVM 4.41-dev is smiling upon thou hsl 3.30 :stuck_out_tongue_winking_eye:. * (Re)target hhvm 3.30-latest in tests Travis picks the newest stable hhvm is you don't say anything. --- .travis.yml | 3 +-- src/Ref.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/Ref.php diff --git a/.travis.yml b/.travis.yml index 77fb1cff..eee4f57e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - hhvm - - hhvm-nightly + - hhvm-3.30 matrix: allow_failures: - php: hhvm diff --git a/src/Ref.php b/src/Ref.php new file mode 100644 index 00000000..06368c4c --- /dev/null +++ b/src/Ref.php @@ -0,0 +1,28 @@ +>` + * over `Vector`. + * + * `C\reduce()` and `C\reduce_with_key()` can also be used in some situations + * to avoid this class. + */ +final class Ref { + <<__RxShallow>> + public function __construct(public T $value) {} +}