mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
Merge branch 'main' into pgsql-18
This commit is contained in:
@@ -20,7 +20,7 @@ class PhpSource extends CustomSourceBase
|
||||
} elseif ($major === 'git') {
|
||||
Downloader::downloadSource('php-src', ['type' => 'git', 'url' => 'https://github.com/php/php-src.git', 'rev' => 'master'], $force);
|
||||
} else {
|
||||
Downloader::downloadSource('php-src', self::getLatestPHPInfo($major), $force);
|
||||
Downloader::downloadSource('php-src', $this->getLatestPHPInfo($major), $force);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class PhpSource extends CustomSourceBase
|
||||
// 查找最新的小版本号
|
||||
$info = json_decode(Downloader::curlExec(
|
||||
url: "https://www.php.net/releases/index.php?json&version={$major_version}",
|
||||
retries: intval(getenv('SPC_DOWNLOAD_RETRIES') ?: 0)
|
||||
retries: (int) getenv('SPC_DOWNLOAD_RETRIES') ?: 0
|
||||
), true);
|
||||
if (!isset($info['version'])) {
|
||||
throw new DownloaderException("Version {$major_version} not found.");
|
||||
|
||||
Reference in New Issue
Block a user