diff --git a/docs/en/guide/cli-reference.md b/docs/en/guide/cli-reference.md index 5a162f97..f5678bd8 100644 --- a/docs/en/guide/cli-reference.md +++ b/docs/en/guide/cli-reference.md @@ -29,7 +29,7 @@ spc download [artifacts] [options] | `--for-packages=` | | 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=` | | PHP version in `major.minor` format (default: `8.4`) | +| `--with-php=` | | 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=` | PHP version to download (default: `8.4`) | +| `--dl-with-php=` | PHP version to download (default: `8.5`) | | `--dl-prefer-binary` | Prefer pre-built binaries for dependencies | | `--dl-parallel=` | Number of parallel downloads | | `--dl-retry=` | 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=` | `-p` | Number of parallel update checks (default: `10`) | -| `--with-php=` | | PHP version context in `major.minor` format (default: `8.4`) | +| `--parallel=` | `-p` | Number of parallel update checks (default: `10`) | +| `--with-php=` | | PHP version context in `major.minor` format (default: `8.5`) | ### Examples diff --git a/docs/en/guide/first-build.md b/docs/en/guide/first-build.md index 24ab6d22..a05230ab 100644 --- a/docs/en/guide/first-build.md +++ b/docs/en/guide/first-build.md @@ -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. diff --git a/docs/zh/guide/cli-reference.md b/docs/zh/guide/cli-reference.md index 7c0d5d33..31bd95d2 100644 --- a/docs/zh/guide/cli-reference.md +++ b/docs/zh/guide/cli-reference.md @@ -22,32 +22,32 @@ spc download [artifacts] [options] ### 选项 -| 选项 | 缩写 | 说明 | -|---|------|---| -| `--for-extensions=` | `-e` | 按扩展名下载其所需的制品 | -| `--for-libs=` | `-l` | 按库名下载其所需的制品 | -| `--for-packages=` | | 按包名下载其所需的制品 | -| `--without-suggests` | | 使用 `--for-extensions` 时跳过建议包 | -| `--clean` | | 下载前删除旧的下载缓存 | -| `--with-php=` | | PHP 版本,格式为 `major.minor`(默认 `8.4`)| -| `--prefer-binary` | `-p` | 优先使用预编译二进制 | -| `--prefer-source` | | 优先使用源码包 | -| `--source-only` | | 仅下载源码制品 | -| `--binary-only` | | 仅下载二进制制品 | -| `--parallel=` | `-P` | 并行下载数(默认 `1`)| -| `--retry=` | `-R` | 失败重试次数(默认 `0`)| -| `--ignore-cache=` | `-i` | 强制重新下载指定制品 | -| `--no-alt` | | 不使用镜像站 | -| `--no-shallow-clone` | | 不使用浅层克隆 | -| `--custom-url=` | `-U` | 覆盖指定源的下载地址 | -| `--custom-git=` | `-G` | 覆盖为自定义 git 仓库 | -| `--custom-local=` | `-L` | 使用本地路径作为制品来源 | +| 选项 | 缩写 | 说明 | +|---|------|------------------------------------| +| `--for-extensions=` | `-e` | 按扩展名下载其所需的制品 | +| `--for-libs=` | `-l` | 按库名下载其所需的制品 | +| `--for-packages=` | | 按包名下载其所需的制品 | +| `--without-suggests` | | 使用 `--for-extensions` 时跳过建议包 | +| `--clean` | | 下载前删除旧的下载缓存 | +| `--with-php=` | | PHP 版本,格式为 `major.minor`(默认 `8.5`) | +| `--prefer-binary` | `-p` | 优先使用预编译二进制 | +| `--prefer-source` | | 优先使用源码包 | +| `--source-only` | | 仅下载源码制品 | +| `--binary-only` | | 仅下载二进制制品 | +| `--parallel=` | `-P` | 并行下载数(默认 `1`) | +| `--retry=` | `-R` | 失败重试次数(默认 `0`) | +| `--ignore-cache=` | `-i` | 强制重新下载指定制品 | +| `--no-alt` | | 不使用镜像站 | +| `--no-shallow-clone` | | 不使用浅层克隆 | +| `--custom-url=` | `-U` | 覆盖指定源的下载地址 | +| `--custom-git=` | `-G` | 覆盖为自定义 git 仓库 | +| `--custom-local=` | `-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 [options] 所有下载器选项均可加 `--dl-` 前缀使用: -| 选项 | 说明 | -|---|---| -| `--dl-with-php=` | 指定下载的 PHP 版本(默认 `8.4`)| -| `--dl-prefer-binary` | 优先使用预编译二进制依赖 | -| `--dl-parallel=` | 并行下载数 | -| `--dl-retry=` | 失败重试次数 | -| `--dl-custom-url=` | 覆盖指定源的下载地址 | -| `--dl-custom-git=` | 覆盖为自定义 git 仓库 | +| 选项 | 说明 | +|---|------------------------| +| `--dl-with-php=` | 指定下载的 PHP 版本(默认 `8.5`) | +| `--dl-prefer-binary` | 优先使用预编译二进制依赖 | +| `--dl-parallel=` | 并行下载数 | +| `--dl-retry=` | 失败重试次数 | +| `--dl-custom-url=` | 覆盖指定源的下载地址 | +| `--dl-custom-git=` | 覆盖为自定义 git 仓库 | Downloader 选项传递给 `build:php` 命令时,会被自动下载器在构建前使用。 这样你就可以直接通过构建命令控制下载行为,无需单独执行 `spc download` 命令。 @@ -265,12 +265,12 @@ spc check-update [artifact] [options] ### 选项 -| 选项 | 缩写 | 说明 | -|---|---|---| -| `--json` | | 以 JSON 格式输出结果 | -| `--bare` | | 检查时不要求制品已下载(旧版本显示为 null)| -| `--parallel=` | `-p` | 并行检查数(默认 `10`)| -| `--with-php=` | | PHP 版本上下文,格式为 `major.minor`(默认 `8.4`)| +| 选项 | 缩写 | 说明 | +|---|---|---------------------------------------| +| `--json` | | 以 JSON 格式输出结果 | +| `--bare` | | 检查时不要求制品已下载(旧版本显示为 null) | +| `--parallel=` | `-p` | 并行检查数(默认 `10`) | +| `--with-php=` | | PHP 版本上下文,格式为 `major.minor`(默认 `8.5`) | ### 示例 diff --git a/docs/zh/guide/first-build.md b/docs/zh/guide/first-build.md index 5c7283d4..018df63e 100644 --- a/docs/zh/guide/first-build.md +++ b/docs/zh/guide/first-build.md @@ -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/` 目录,重复构建时会直接复用。