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

Commit

Permalink
Add --empty-expression and --hhvm-4.6-to-4.7 hhast-migrate stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed May 28, 2019
1 parent 8b8db37 commit 78d9728
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions src/__Private/MigrationCLI.hack
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,30 @@ class MigrationCLI extends CLIWithRequiredArguments {
),
CLIOptions\flag(
() ==> {
throw new ExitException(1, "Use HHAST 4.2.* or below for this migration");
throw new ExitException(
1,
"Use HHAST 4.2.* or below for this migration",
);
},
'no longer supported',
'--hhvm-4.2-to-4.3',
),
CLIOptions\flag(
() ==> {
throw new ExitException(1, "Use HHAST 4.2.* or below for this migration");
throw new ExitException(
1,
"Use HHAST 4.2.* or below for this migration",
);
},
'no longer supported',
'--ltgt-to-ne',
),
CLIOptions\flag(
() ==> {
throw new ExitException(1, "Use HHAST 4.2.* or below for this migration");
throw new ExitException(
1,
"Use HHAST 4.2.* or below for this migration",
);
},
'no longer supported',
'--hhvm-3.28-to-3.29',
Expand Down Expand Up @@ -187,6 +196,20 @@ class MigrationCLI extends CLIWithRequiredArguments {
'no longer supported',
'--hhvm-4.5-to-4.6',
),
CLIOptions\flag(
() ==> {
throw new ExitException(1, 'Use HHAST 4.6.1 for this migration');
},
'no longer supported',
'--empty-expression',
),
CLIOptions\flag(
() ==> {
throw new ExitException(1, 'Use HHAST 4.6.1 for this migration');
},
'no longer supported',
'--hhvm-4.6-to-4.7',
),
CLIOptions\flag(
() ==> {
$this->migrations[] = AddFixMesMigration::class;
Expand Down Expand Up @@ -361,7 +384,7 @@ class MigrationCLI extends CLIWithRequiredArguments {
private static ?(string, bool) $lastFileIsHack = null;

private static function isHackFile(string $file): bool {
if (self::$lastFileIsHack is nonnull){
if (self::$lastFileIsHack is nonnull) {
list($cache_file, $cache_result) = self::$lastFileIsHack;
if ($cache_file === $file) {
return $cache_result;
Expand Down

0 comments on commit 78d9728

Please sign in to comment.