Skip to content

Commit ee46c1c

Browse files
committed
Fix switch-php-version command not working bug
1 parent 64fde5f commit ee46c1c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Package/Command/SwitchPhpVersionCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ public function handle(): int
6767
InteractiveTerm::finish('Removed: ' . $source_dir);
6868
}
6969

70-
// Set the PHP version for download
71-
// This defines the version that will be used when resolving php-src artifact
72-
define('SPC_BUILD_PHP_VERSION', $php_ver);
73-
7470
// Download new PHP source
7571
$this->output->writeln("<info>Downloading PHP {$php_ver} source...</info>");
7672

73+
$this->input->setOption('with-php', $php_ver);
74+
7775
$downloaderOptions = DownloaderOptions::extractFromConsoleOptions($this->input->getOptions());
7876
$downloader = new ArtifactDownloader($downloaderOptions);
7977

0 commit comments

Comments
 (0)