mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
Use PHP 8.5 by default
This commit is contained in:
@@ -29,7 +29,7 @@ spc download [artifacts] [options]
|
||||
| `--for-packages=<list>` | | Download artifacts needed by the given packages |
|
||||
| `--without-suggests` | | Skip suggested packages when using `--for-extensions` |
|
||||
| `--clean` | | Delete existing download cache before fetching |
|
||||
| `--with-php=<ver>` | | PHP version in `major.minor` format (default: `8.4`) |
|
||||
| `--with-php=<ver>` | | PHP version in `major.minor` format (default: `8.5`) |
|
||||
| `--prefer-binary` | `-p` | Prefer pre-built binaries over source archives |
|
||||
| `--prefer-source` | | Prefer source archives over pre-built binaries |
|
||||
| `--source-only` | | Only download source artifacts |
|
||||
@@ -47,7 +47,7 @@ spc download [artifacts] [options]
|
||||
|
||||
```bash
|
||||
# Download only what the chosen extensions need
|
||||
spc download --for-extensions="bcmath,openssl,curl" --with-php=8.4
|
||||
spc download --for-extensions="bcmath,openssl,curl" --with-php=8.5
|
||||
|
||||
# Download specific artifacts
|
||||
spc download "php-src,openssl"
|
||||
@@ -136,7 +136,7 @@ All downloader options are available with the `--dl-` prefix:
|
||||
|
||||
| Option | Description |
|
||||
|------------------------------------|--------------------------------------------|
|
||||
| `--dl-with-php=<ver>` | PHP version to download (default: `8.4`) |
|
||||
| `--dl-with-php=<ver>` | PHP version to download (default: `8.5`) |
|
||||
| `--dl-prefer-binary` | Prefer pre-built binaries for dependencies |
|
||||
| `--dl-parallel=<n>` | Number of parallel downloads |
|
||||
| `--dl-retry=<n>` | Number of retries on failure |
|
||||
@@ -265,12 +265,12 @@ spc check-update [artifact] [options]
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Short | Description |
|
||||
|---|---|---|
|
||||
| `--json` | | Output results in JSON format |
|
||||
| Option | Short | Description |
|
||||
|---|---|------------------------------------------------------------------------------------------|
|
||||
| `--json` | | Output results in JSON format |
|
||||
| `--bare` | | Check without requiring the artifact to be downloaded first (old version will be `null`) |
|
||||
| `--parallel=<n>` | `-p` | Number of parallel update checks (default: `10`) |
|
||||
| `--with-php=<ver>` | | PHP version context in `major.minor` format (default: `8.4`) |
|
||||
| `--parallel=<n>` | `-p` | Number of parallel update checks (default: `10`) |
|
||||
| `--with-php=<ver>` | | PHP version context in `major.minor` format (default: `8.5`) |
|
||||
|
||||
### Examples
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ The `craft` command reads a `craft.yml` file and handles everything automaticall
|
||||
Create a `craft.yml` in your working directory and declare the PHP version, extensions, and target SAPIs:
|
||||
|
||||
```yaml
|
||||
php-version: 8.4
|
||||
php-version: 8.5
|
||||
extensions: bcmath,posix,phar,zlib,openssl,curl,fileinfo,tokenizer
|
||||
sapi:
|
||||
- cli
|
||||
@@ -80,10 +80,10 @@ If you want to pre-download ahead of time, or if you're working in a slow-networ
|
||||
|
||||
```bash
|
||||
# Download only what the chosen extensions need (recommended)
|
||||
spc download --for-extensions="bcmath,posix,phar,zlib,openssl,curl,fileinfo,tokenizer" --with-php=8.4
|
||||
spc download --for-extensions="bcmath,posix,phar,zlib,openssl,curl,fileinfo,tokenizer" --with-php=8.5
|
||||
|
||||
# Download by specific package names
|
||||
spc download "curl,openssl" --with-php=8.4
|
||||
spc download "curl,openssl" --with-php=8.5
|
||||
```
|
||||
|
||||
Downloads are cached in `downloads/` and reused across builds automatically.
|
||||
|
||||
@@ -22,32 +22,32 @@ spc download [artifacts] [options]
|
||||
|
||||
### 选项
|
||||
|
||||
| 选项 | 缩写 | 说明 |
|
||||
|---|------|---|
|
||||
| `--for-extensions=<list>` | `-e` | 按扩展名下载其所需的制品 |
|
||||
| `--for-libs=<list>` | `-l` | 按库名下载其所需的制品 |
|
||||
| `--for-packages=<list>` | | 按包名下载其所需的制品 |
|
||||
| `--without-suggests` | | 使用 `--for-extensions` 时跳过建议包 |
|
||||
| `--clean` | | 下载前删除旧的下载缓存 |
|
||||
| `--with-php=<ver>` | | PHP 版本,格式为 `major.minor`(默认 `8.4`)|
|
||||
| `--prefer-binary` | `-p` | 优先使用预编译二进制 |
|
||||
| `--prefer-source` | | 优先使用源码包 |
|
||||
| `--source-only` | | 仅下载源码制品 |
|
||||
| `--binary-only` | | 仅下载二进制制品 |
|
||||
| `--parallel=<n>` | `-P` | 并行下载数(默认 `1`)|
|
||||
| `--retry=<n>` | `-R` | 失败重试次数(默认 `0`)|
|
||||
| `--ignore-cache=<list>` | `-i` | 强制重新下载指定制品 |
|
||||
| `--no-alt` | | 不使用镜像站 |
|
||||
| `--no-shallow-clone` | | 不使用浅层克隆 |
|
||||
| `--custom-url=<src:url>` | `-U` | 覆盖指定源的下载地址 |
|
||||
| `--custom-git=<src:branch:url>` | `-G` | 覆盖为自定义 git 仓库 |
|
||||
| `--custom-local=<src:path>` | `-L` | 使用本地路径作为制品来源 |
|
||||
| 选项 | 缩写 | 说明 |
|
||||
|---|------|------------------------------------|
|
||||
| `--for-extensions=<list>` | `-e` | 按扩展名下载其所需的制品 |
|
||||
| `--for-libs=<list>` | `-l` | 按库名下载其所需的制品 |
|
||||
| `--for-packages=<list>` | | 按包名下载其所需的制品 |
|
||||
| `--without-suggests` | | 使用 `--for-extensions` 时跳过建议包 |
|
||||
| `--clean` | | 下载前删除旧的下载缓存 |
|
||||
| `--with-php=<ver>` | | PHP 版本,格式为 `major.minor`(默认 `8.5`) |
|
||||
| `--prefer-binary` | `-p` | 优先使用预编译二进制 |
|
||||
| `--prefer-source` | | 优先使用源码包 |
|
||||
| `--source-only` | | 仅下载源码制品 |
|
||||
| `--binary-only` | | 仅下载二进制制品 |
|
||||
| `--parallel=<n>` | `-P` | 并行下载数(默认 `1`) |
|
||||
| `--retry=<n>` | `-R` | 失败重试次数(默认 `0`) |
|
||||
| `--ignore-cache=<list>` | `-i` | 强制重新下载指定制品 |
|
||||
| `--no-alt` | | 不使用镜像站 |
|
||||
| `--no-shallow-clone` | | 不使用浅层克隆 |
|
||||
| `--custom-url=<src:url>` | `-U` | 覆盖指定源的下载地址 |
|
||||
| `--custom-git=<src:branch:url>` | `-G` | 覆盖为自定义 git 仓库 |
|
||||
| `--custom-local=<src:path>` | `-L` | 使用本地路径作为制品来源 |
|
||||
|
||||
### 示例
|
||||
|
||||
```bash
|
||||
# 按扩展名下载(推荐)
|
||||
spc download --for-extensions="bcmath,openssl,curl" --with-php=8.4
|
||||
spc download --for-extensions="bcmath,openssl,curl" --with-php=8.5
|
||||
|
||||
# 下载指定制品
|
||||
spc download "php-src,openssl"
|
||||
@@ -134,14 +134,14 @@ spc build:php <extensions> [options]
|
||||
|
||||
所有下载器选项均可加 `--dl-` 前缀使用:
|
||||
|
||||
| 选项 | 说明 |
|
||||
|---|---|
|
||||
| `--dl-with-php=<ver>` | 指定下载的 PHP 版本(默认 `8.4`)|
|
||||
| `--dl-prefer-binary` | 优先使用预编译二进制依赖 |
|
||||
| `--dl-parallel=<n>` | 并行下载数 |
|
||||
| `--dl-retry=<n>` | 失败重试次数 |
|
||||
| `--dl-custom-url=<src:url>` | 覆盖指定源的下载地址 |
|
||||
| `--dl-custom-git=<src:branch:url>` | 覆盖为自定义 git 仓库 |
|
||||
| 选项 | 说明 |
|
||||
|---|------------------------|
|
||||
| `--dl-with-php=<ver>` | 指定下载的 PHP 版本(默认 `8.5`) |
|
||||
| `--dl-prefer-binary` | 优先使用预编译二进制依赖 |
|
||||
| `--dl-parallel=<n>` | 并行下载数 |
|
||||
| `--dl-retry=<n>` | 失败重试次数 |
|
||||
| `--dl-custom-url=<src:url>` | 覆盖指定源的下载地址 |
|
||||
| `--dl-custom-git=<src:branch:url>` | 覆盖为自定义 git 仓库 |
|
||||
|
||||
Downloader 选项传递给 `build:php` 命令时,会被自动下载器在构建前使用。
|
||||
这样你就可以直接通过构建命令控制下载行为,无需单独执行 `spc download` 命令。
|
||||
@@ -265,12 +265,12 @@ spc check-update [artifact] [options]
|
||||
|
||||
### 选项
|
||||
|
||||
| 选项 | 缩写 | 说明 |
|
||||
|---|---|---|
|
||||
| `--json` | | 以 JSON 格式输出结果 |
|
||||
| `--bare` | | 检查时不要求制品已下载(旧版本显示为 null)|
|
||||
| `--parallel=<n>` | `-p` | 并行检查数(默认 `10`)|
|
||||
| `--with-php=<ver>` | | PHP 版本上下文,格式为 `major.minor`(默认 `8.4`)|
|
||||
| 选项 | 缩写 | 说明 |
|
||||
|---|---|---------------------------------------|
|
||||
| `--json` | | 以 JSON 格式输出结果 |
|
||||
| `--bare` | | 检查时不要求制品已下载(旧版本显示为 null) |
|
||||
| `--parallel=<n>` | `-p` | 并行检查数(默认 `10`) |
|
||||
| `--with-php=<ver>` | | PHP 版本上下文,格式为 `major.minor`(默认 `8.5`) |
|
||||
|
||||
### 示例
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ StaticPHP 提供两种构建方式,根据使用场景选择:
|
||||
在当前目录创建 `craft.yml`,声明要编译的 PHP 版本、扩展和目标 SAPI:
|
||||
|
||||
```yaml
|
||||
php-version: 8.4
|
||||
php-version: 8.5
|
||||
extensions: bcmath,posix,phar,zlib,openssl,curl,fileinfo,tokenizer
|
||||
sapi:
|
||||
- cli
|
||||
@@ -80,10 +80,10 @@ v3 版本中,你可以省略这一步骤,直接构建想要的内容,Stati
|
||||
|
||||
```bash
|
||||
# 按扩展列表下载(推荐,只下载实际需要的内容)
|
||||
spc download --for-extensions="bcmath,posix,phar,zlib,openssl,curl,fileinfo,tokenizer" --with-php=8.4
|
||||
spc download --for-extensions="bcmath,posix,phar,zlib,openssl,curl,fileinfo,tokenizer" --with-php=8.5
|
||||
|
||||
# 按依赖包列表下载
|
||||
spc download "curl,openssl" --with-php=8.4
|
||||
spc download "curl,openssl" --with-php=8.5
|
||||
```
|
||||
|
||||
下载内容缓存在 `downloads/` 目录,重复构建时会直接复用。
|
||||
|
||||
Reference in New Issue
Block a user