From 8c290dbf663780561c92f84c428df141d04bf104 Mon Sep 17 00:00:00 2001 From: jjergus Date: Mon, 9 Nov 2020 09:27:19 -0800 Subject: [PATCH] add compatible schema version (2020-11-02-0001) --- src/__Private/is_compatible_schema_version.hack | 6 ++---- tests/PocketAtomExpressionLinterTest.hack | 6 ++---- tests/PocketIdentifierExpressionLinterTest.hack | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/__Private/is_compatible_schema_version.hack b/src/__Private/is_compatible_schema_version.hack index e5734183b..462aaad18 100644 --- a/src/__Private/is_compatible_schema_version.hack +++ b/src/__Private/is_compatible_schema_version.hack @@ -33,13 +33,11 @@ function is_compatible_schema_version(string $other_version): bool { switch ($other_version) { // preceding versions: - case '2020-10-15-0001': + case '2020-10-15-0001': // missing enum-dependent type syntax return true; - /* // succeeding versions: - case 'version-number': // missing ... + case '2020-11-02-0001': // removes Pocket Universe syntax return true; - */ default: return false; } diff --git a/tests/PocketAtomExpressionLinterTest.hack b/tests/PocketAtomExpressionLinterTest.hack index 5e0b15574..108fa5ba5 100644 --- a/tests/PocketAtomExpressionLinterTest.hack +++ b/tests/PocketAtomExpressionLinterTest.hack @@ -13,10 +13,8 @@ final class PocketAtomExpressionLinterTest extends TestCase { use LinterTestTrait; protected function getLinter(string $file): PocketAtomExpressionLinter { - if (\version_compare(\HHVM_VERSION, '4.23.0') < 0) { - self::markTestSkipped( - 'Pocket Universe tests are only relevant on HHVM 4.23+', - ); + if (\HHVM_VERSION_ID >= 408300) { + self::markTestSkipped('Pocket Universe syntax was removed in HHVM 4.83'); } return PocketAtomExpressionLinter::fromPath($file); } diff --git a/tests/PocketIdentifierExpressionLinterTest.hack b/tests/PocketIdentifierExpressionLinterTest.hack index 8e424a7bd..7c4df2113 100644 --- a/tests/PocketIdentifierExpressionLinterTest.hack +++ b/tests/PocketIdentifierExpressionLinterTest.hack @@ -15,10 +15,8 @@ final class PocketIdentifierExpressionLinterTest extends TestCase { protected function getLinter( string $file, ): PocketIdentifierExpressionLinter { - if (\version_compare(\HHVM_VERSION, '4.23.0') < 0) { - self::markTestSkipped( - 'Pocket Universe tests are only relevant on HHVM 4.23+', - ); + if (\HHVM_VERSION_ID >= 408300) { + self::markTestSkipped('Pocket Universe syntax was removed in HHVM 4.83'); } return PocketIdentifierExpressionLinter::fromPath($file); }