mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
Update CLI documentation for clarity and accuracy
This commit is contained in:
@@ -516,10 +516,3 @@ spc spc-config "bcmath,openssl" --libs
|
||||
# Use absolute library paths
|
||||
spc spc-config "bcmath,openssl" --libs --absolute-libs
|
||||
```
|
||||
Enter an interactive shell with StaticPHP's build environment pre-loaded (compiler wrappers, `buildroot/`, `pkgroot/` paths, etc. on `PATH`).
|
||||
|
||||
```bash
|
||||
spc dev:shell
|
||||
```
|
||||
|
||||
Useful for compiling small programs against `libphp.a` (embed SAPI) or inspecting the build environment manually.
|
||||
|
||||
@@ -74,6 +74,10 @@ This approach lets you run download and compile as separate steps — useful whe
|
||||
|
||||
### Step 1: Download Dependencies
|
||||
|
||||
In v3, you can skip this step entirely — running `build:php` directly will automatically download any missing artifacts.
|
||||
|
||||
If you want to pre-download ahead of time, or if you're working in a slow-network environment and want to separate the download phase, use the `download` command:
|
||||
|
||||
```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
|
||||
|
||||
@@ -82,13 +82,6 @@ The script downloads `php` and `composer` into a `runtime/` subdirectory. You th
|
||||
# Add this to ~/.bashrc or ~/.zshrc to make it permanent
|
||||
```
|
||||
|
||||
::: tip
|
||||
In regions with restricted access to GitHub or getcomposer.org, pass `--mirror china` to use a mirror:
|
||||
```bash
|
||||
bin/setup-runtime --mirror china
|
||||
```
|
||||
:::
|
||||
|
||||
## Vendor mode
|
||||
|
||||
If you already have a PHP project and want to call StaticPHP's build APIs directly, or use a custom registry to support private libraries and extensions, pull it in as a Composer dependency:
|
||||
|
||||
Reference in New Issue
Block a user