Skip to content

Commit 067b02f

Browse files
henderkesmhpcc
andauthored
update php default to 8.4 (#621)
* update php defaul to 8.4 * update config * Update README.md --------- Co-authored-by: Marc Henderkes <[email protected]>
1 parent 36dc180 commit 067b02f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Basic usage for building php with some extensions:
200200
./bin/spc download --for-extensions="openssl,pcntl,mbstring,pdo_sqlite"
201201
# download pre-built libraries first (save time for compiling dependencies)
202202
./bin/spc download --for-extensions="openssl,curl,mbstring,mbregex" --prefer-pre-built
203-
# download different PHP version (--with-php=x.y or --with-php=x.y.z, recommend 8.1 ~ 8.3)
203+
# download different PHP version (--with-php=x.y or --with-php=x.y.z, recommend 8.3 ~ 8.4)
204204
./bin/spc download --for-extensions="openssl,curl,mbstring" --with-php=8.1
205205

206206
# with bcmath,openssl,tokenizer,sqlite3,pdo_sqlite,ftp,curl extension, build both CLI and phpmicro SAPI

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
],
4545
"scripts": {
4646
"analyse": "phpstan analyse --memory-limit 300M",
47-
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
47+
"cs-fix": "php-cs-fixer fix",
4848
"test": "vendor/bin/phpunit tests/ --no-coverage",
4949
"build:phar": "vendor/bin/box compile"
5050
},

docs/en/guide/manual-build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Use the command `bin/spc download` to download the source code required for comp
139139
including php-src and the source code of various dependent libraries.
140140

141141
```bash
142-
# Download all dependencies
142+
# Download all dependencies, defaults to php 8.4
143143
bin/spc download --all
144144

145145
# Download all dependent packages, and specify the main version of PHP to download, optional: 8.1, 8.2, 8.3, 8.4

src/SPC/command/DownloadCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function configure(): void
3030
$this->addArgument('sources', InputArgument::REQUIRED, 'The sources will be compiled, comma separated');
3131
$this->addOption('shallow-clone', null, null, 'Clone shallow');
3232
$this->addOption('with-openssl11', null, null, 'Use openssl 1.1');
33-
$this->addOption('with-php', null, InputOption::VALUE_REQUIRED, 'version in major.minor format (default 8.3)', '8.3');
33+
$this->addOption('with-php', null, InputOption::VALUE_REQUIRED, 'version in major.minor format (default 8.4)', '8.4');
3434
$this->addOption('clean', null, null, 'Clean old download cache and source before fetch');
3535
$this->addOption('all', 'A', null, 'Fetch all sources that static-php-cli needed');
3636
$this->addOption('custom-url', 'U', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Specify custom source download url, e.g "php-src:https://downloads.php.net/~eric/php-8.3.0beta1.tar.gz"');
@@ -118,7 +118,7 @@ public function handle(): int
118118
}
119119

120120
// Define PHP major version
121-
$ver = $this->php_major_ver = $this->getOption('with-php') ?? '8.1';
121+
$ver = $this->php_major_ver = $this->getOption('with-php');
122122
define('SPC_BUILD_PHP_VERSION', $ver);
123123
// match x.y
124124
preg_match('/^\d+\.\d+$/', $ver, $matches);

0 commit comments

Comments
 (0)