From 73e3480bdfbe879eecf72697b603d736cf24b952 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 2 Nov 2024 21:44:55 +0800 Subject: [PATCH] Add 8.4 support for switch-php-version command --- src/SPC/command/SwitchPhpVersionCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SPC/command/SwitchPhpVersionCommand.php b/src/SPC/command/SwitchPhpVersionCommand.php index f0f454dd..ab91ed07 100644 --- a/src/SPC/command/SwitchPhpVersionCommand.php +++ b/src/SPC/command/SwitchPhpVersionCommand.php @@ -19,9 +19,9 @@ class SwitchPhpVersionCommand extends BaseCommand $this->addArgument( 'php-major-version', InputArgument::REQUIRED, - 'PHP major version (supported: 7.4, 8.0, 8.1, 8.2, 8.3)', + 'PHP major version (supported: 7.4, 8.0, 8.1, 8.2, 8.3, 8.4)', null, - fn () => ['7.4', '8.0', '8.1', '8.2', '8.3'] + fn () => ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] ); $this->no_motd = true; @@ -31,7 +31,7 @@ class SwitchPhpVersionCommand extends BaseCommand public function handle(): int { $php_ver = $this->input->getArgument('php-major-version'); - if (!in_array($php_ver, ['7.4', '8.0', '8.1', '8.2', '8.3'])) { + if (!in_array($php_ver, ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'])) { // match x.y.z preg_match('/^\d+\.\d+\.\d+$/', $php_ver, $matches); if (!$matches) {