Use PHP 8.5 by default

This commit is contained in:
crazywhalecc
2026-05-11 09:47:10 +08:00
parent b8ee484e81
commit 685f5c565f
3 changed files with 5 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ class PhpRelease implements DownloadTypeInterface, ValidatorInterface, CheckUpda
public function download(string $name, array $config, ArtifactDownloader $downloader): DownloadResult public function download(string $name, array $config, ArtifactDownloader $downloader): DownloadResult
{ {
$phpver = $downloader->getOption('with-php', '8.4'); $phpver = $downloader->getOption('with-php', '8.5');
// Handle 'git' version to clone from php-src repository // Handle 'git' version to clone from php-src repository
if ($phpver === 'git') { if ($phpver === 'git') {
$this->sha256 = null; $this->sha256 = null;
@@ -74,7 +74,7 @@ class PhpRelease implements DownloadTypeInterface, ValidatorInterface, CheckUpda
public function checkUpdate(string $name, array $config, ?string $old_version, ArtifactDownloader $downloader): CheckUpdateResult public function checkUpdate(string $name, array $config, ?string $old_version, ArtifactDownloader $downloader): CheckUpdateResult
{ {
$phpver = $downloader->getOption('with-php', '8.4'); $phpver = $downloader->getOption('with-php', '8.5');
if ($phpver === 'git') { if ($phpver === 'git') {
// git version: delegate to Git checkUpdate with master branch // git version: delegate to Git checkUpdate with master branch
return (new Git())->checkUpdate($name, ['url' => 'https://github.com/php/php-src.git', 'rev' => 'master'], $old_version, $downloader); return (new Git())->checkUpdate($name, ['url' => 'https://github.com/php/php-src.git', 'rev' => 'master'], $old_version, $downloader);
@@ -90,7 +90,7 @@ class PhpRelease implements DownloadTypeInterface, ValidatorInterface, CheckUpda
protected function fetchPhpReleaseInfo(string $name, array $config, ArtifactDownloader $downloader): array protected function fetchPhpReleaseInfo(string $name, array $config, ArtifactDownloader $downloader): array
{ {
$phpver = $downloader->getOption('with-php', '8.4'); $phpver = $downloader->getOption('with-php', '8.5');
// Handle 'git' version to clone from php-src repository // Handle 'git' version to clone from php-src repository
if ($phpver === 'git') { if ($phpver === 'git') {
// cannot fetch release info for git version, return empty info to skip validation // cannot fetch release info for git version, return empty info to skip validation

View File

@@ -52,7 +52,7 @@ class DownloaderOptions
return [ return [
// php version option // php version option
new InputOption("{$p}with-php", null, InputOption::VALUE_REQUIRED, 'PHP version in major.minor format (default 8.4)', '8.4'), new InputOption("{$p}with-php", null, InputOption::VALUE_REQUIRED, 'PHP version in major.minor format (default 8.5)', '8.5'),
// download preference options // download preference options
new InputOption("{$p}prefer-source", null, InputOption::VALUE_OPTIONAL, 'Prefer source downloads when both source and binary are available', false), new InputOption("{$p}prefer-source", null, InputOption::VALUE_OPTIONAL, 'Prefer source downloads when both source and binary are available', false),

View File

@@ -26,7 +26,7 @@ class CheckUpdateCommand extends BaseCommand
$this->addOption('parallel', 'p', InputOption::VALUE_REQUIRED, 'Number of parallel update checks (default: 10)', 10); $this->addOption('parallel', 'p', InputOption::VALUE_REQUIRED, 'Number of parallel update checks (default: 10)', 10);
// --with-php option for checking updates with a specific PHP version context // --with-php option for checking updates with a specific PHP version context
$this->addOption('with-php', null, InputOption::VALUE_REQUIRED, 'PHP version in major.minor format (default 8.4)', '8.4'); $this->addOption('with-php', null, InputOption::VALUE_REQUIRED, 'PHP version in major.minor format (default 8.5)', '8.5');
} }
public function handle(): int public function handle(): int