1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.4' into PHP-8.5

* PHP-8.4:
  gen_stub: Fix php-parser package download (#20775)
This commit is contained in:
Máté Kocsis
2025-12-25 21:10:49 +01:00

View File

@@ -6048,9 +6048,10 @@ function installPhpParser(string $version, string $phpParserDir) {
chdir(__DIR__);
$tarName = "v$version.tar.gz";
passthru("wget https://github.com/nikic/PHP-Parser/archive/$tarName", $exit);
$downloadUrl = "https://github.com/nikic/PHP-Parser/archive/$tarName";
passthru("wget -O $tarName $downloadUrl", $exit);
if ($exit !== 0) {
passthru("curl -LO https://github.com/nikic/PHP-Parser/archive/$tarName", $exit);
passthru("curl -LO $downloadUrl", $exit);
}
if ($exit !== 0) {
throw new Exception("Failed to download PHP-Parser tarball");
@@ -6060,6 +6061,7 @@ function installPhpParser(string $version, string $phpParserDir) {
}
passthru("tar xvzf $tarName -C PHP-Parser-$version --strip-components 1", $exit);
if ($exit !== 0) {
rmdir($phpParserDir);
throw new Exception("Failed to extract PHP-Parser tarball");
}
unlink(__DIR__ . "/$tarName");