add extract command, add -U option (custom download source

This commit is contained in:
crazywhalecc
2023-07-28 00:02:49 +08:00
committed by Jerry Ma
parent f7730735c0
commit ea322c0d3b
7 changed files with 132 additions and 59 deletions

View File

@@ -22,7 +22,7 @@ class PhpVerCommand extends BaseCommand
{
// Find php from source/php-src
$file = SOURCE_PATH . '/php-src/main/php_version.h';
$result = preg_match('/#define PHP_VERSION "(\d+\.\d+\.\d+)"/', file_get_contents($file), $match);
$result = preg_match('/#define PHP_VERSION "([^"]+)"/', file_get_contents($file), $match);
if ($result === false) {
$this->output->writeln('<error>PHP source not found, maybe you need to extract first ?</error>');
return 1;