diff --git a/scripts/dev/gen_stub.php b/scripts/dev/gen_stub.php index 59b7d448f6769..1273ec1641989 100755 --- a/scripts/dev/gen_stub.php +++ b/scripts/dev/gen_stub.php @@ -360,7 +360,11 @@ function initPhpParser() { if (!is_dir($phpParserDir)) { $cwd = getcwd(); chdir(__DIR__); + passthru("wget https://github.com/nikic/PHP-Parser/archive/v$version.tar.gz", $exit); + if ($exit !== 0) { + passthru("curl -LO https://github.com/nikic/PHP-Parser/archive/v$version.tar.gz", $exit); + } if ($exit !== 0) { throw new Exception("Failed to download PHP-Parser tarball"); }