<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://dl.static-php.dev/v3/spc-bin/nightly/spc-linux-x86_64</span></span></code></pre></div><h2id="removed-commands"tabindex="-1">Removed Commands <aclass="header-anchor"href="#removed-commands"aria-label="Permalink to “Removed Commands”"></a></h2><tabletabindex="0"><thead><tr><th>v2 Command</th><th>v3 Replacement</th><th>Notes</th></tr></thead><tbody><tr><td><code>del-download</code></td><td><code>spc reset</code></td><td><code>reset</code> also accepts <code>--with-pkgroot</code> and <code>--with-download</code> for finer control</td></tr><tr><td><code>del-download --all</code></td><td><code>spc reset --with-download</code></td><td>Removes the downloads cache directory</td></tr></tbody></table><h2id="removed-options"tabindex="-1">Removed Options <aclass="header-anchor"href="#removed-options"aria-label="Permalink to “Removed Options”"></a></h2><h3id="with-added-patch-p-build-command"tabindex="-1"><code>--with-added-patch</code> / <code>-P</code> (build command) <aclass="header-anchor"href="#with-added-patch-p-build-command"aria-label="Permalink to “--with-added-patch / -P (build command)”"></a></h3><p>This option allowed injecting external PHP patch scripts at specific build stages. <strong>It has been removed in v3.</strong></p><p>There is no direct drop-in replacement. If you relied on this feature:</p><ul><li>Consider contributing your patches upstream to the StaticPHP repository.</li><li>For project-specific patches, use a custom registry with a package class. See <ahref="/en/develop/extending/package-classes.html">Writing Package Classes</a> for details.</li></ul><divclass="tip custom-block"><pclass="custom-block-title">Future Plans</p><p>A single-file hook API for lightweight patches may be provided in a future release.</p></div><h3id="windows-only-with-sdk-binary-dir-and-vs-ver"tabindex="-1">Windows-only: <code>--with-sdk-binary-dir</code> and <code>--vs-ver</code><aclass="header-anchor"href="#windows-only-with-sdk-binary-dir-and-vs-ver"aria-label="Permalink to “Windows-only: --with-sdk-binary-dir and --vs-ver”"></a></h3><p>These options are no longer accepted on the command line. Instead, set the <code>PHP_SDK_PATH</code> environment variable to point to your PHP SDK binary tools directory. The Visual Studio version is now managed by the toolchain configuration.</p><h2id="renamed-deprecated-options"tabindex="-1">Renamed / Deprecated Options <aclass="header-anchor"href="#renamed-deprecated-options"aria-label="Permalink to “Renamed / Deprecated Options”"></a></h2><p>The following options have been renamed. The old names are accepted where noted, but you should update your scripts.</p><tabletabindex="0"><thead><tr><th>v2 Option</th><th>v3 Option</th><th>Status</th></tr></thead><tbody><tr><td><code>--prefer-pre-built</code></td><td><code>--prefer-binary</code> / <code>-p</code></td><td>Old name kept as a deprecated alias</td></tr><tr><td><code>--with-libs=<list></code></td><td><code>--with-packages=<list></code></td><td>—</td></tr><tr><td><code>--with-suggested-libs</code> / <code>-L</code></td><td><code>--with-suggests</code></td><td>Old <code>-L</code> / <code>-E</code> flags removed</td></tr><tr><td><code>--with-suggested-exts</code> / <code>-E</code></td><td><code>--with-suggests</code></td><td>Merged into a single flag</td></tr></tbody></table><h3id="example"tabindex="-1">Example <aclass="header-anchor"href="#example"aria-label="Permalink to “Example”"></a></h3><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr">
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl,gd</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-packages=</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"openssl"</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-suggests</span></span></code></pre></div><h2id="changed-build-command-behaviour"tabindex="-1">Changed <code>build</code> Command Behaviour <aclass="header-anchor"href="#changed-build-command-behaviour"aria-label="Permalink to “Changed build Command Behaviour”"></a></h2><p>The <code>build</code> command (alias: <code>build:php</code>) still works. However, v3 also provides <strong>dedicated single-target commands</strong> that do not require SAPI selection flags:</p><tabletabindex="0"><thead><tr><th>v2</th><th>v3 Equivalent</th></tr></thead><tbody><tr><td><code>spc build exts --build-cli</code></td><td><code>spc build:php-cli exts</code></td></tr><tr><td><code>spc build exts --build-fpm</code></td><td><code>spc build:php-fpm exts</code></td></tr><tr><td><code>spc build exts --build-cgi</code></td><td><code>spc build:php-cgi exts</code></td></tr><tr><td><code>spc build exts --build-micro</code></td><td><code>spc build:php-micro exts</code></td></tr><tr><td><code>spc build exts --build-embed</code></td><td><code>spc build:php-embed exts</code></td></tr><tr><td><code>spc build exts --build-frankenphp</code></td><td><code>spc build:frankenphp exts</code></td></tr></tbody></table><p>Use <code>build:php</code> when you need to build multiple SAPIs in one pass (the <code>--build-*</code> flags remain valid there).</p><h3id="automatic-download-in-build-commands"tabindex="-1">Automatic Download in Build Commands <aclass="header-anchor"href="#automatic-download-in-build-commands"aria-label="Permalink to “Automatic Download in Build Commands”"></a></h3><p>In v3, all <code>build:*</code> commands automatically download any missing dependencies before building. You no longer need to run <code>spc download</code> as a separate step:</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># v2 — two steps required</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># v3 — one step is enough</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php-cli</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl,gd</span></span></code></pre></div><p>To opt out of the automatic download (for example in CI where sources are pre-cached), pass <code>--no-download</code>:</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php-cli</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl,gd</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-download</span></span></code></pre></div><h2id="changed-download-command-options"tabindex="-1">Changed <code>download</code> Command Options <aclass="header-anchor"href="#changed-download-command-options"aria-label="Permalink to “Changed download Command Options”"></a></h2><tabletabindex="0"><thead><tr><th>v2</th><th>v3</th><th>Notes</th></tr></thead><tbody><tr><td><code>--prefer-pre-built</code></td><td><code>--prefer-binary</code> / <code>-p</code></td><td>Deprecated alias kept</td></tr><tr><td><code>--with-libs</code></td><td><code>--for-libs</code></td><td>Separate from packages</td></tr><tr><td><em>(no equivalent)</em></td><td><code>--for-packages</code></td><td>Unified package filter</td></tr><tr><td><em>(no equivalent)</em></td><td><code>--parallel</code> / <code>-P</code></td><td>Parallel downloads</td></tr><tr><td><em>(no equivalent)</em></td><td><code>--retry</code> / <code>-R</code></td><td>Retry on failure</td></tr></tbody></table><h2id="removed-dev-commands"tabindex="-1">Removed Dev Commands <aclass="header-anchor"href="#removed-dev-commands"aria-label="Permalink to “Removed Dev Commands”"></a></h2><p>These development utility commands have been removed or consolidated:</p><tabletabindex="0"><thead><tr><th>v2 Command</th><th>v3 Replacement</th></tr></thead><tbody><tr><td><code>dev:extensions</code> / <code>list-ext</code></td><td><code>spc dev:info <package></code></td></tr><tr><td><code>dev:ext-version</code> / <code>dev:ext-ver</code></td><td><code>spc dev:info <package></code></td></tr><tr><td><code>dev:lib-version</code> / <code>dev:lib-ver</code></td><td><code>spc dev:info <package></code></td></tr><tr><td><code>dev:php-version</code> / <code>dev:php-ver</code></td><td><code>spc dev:info php-src</code></td></tr><tr><td><code>dev:gen-ext-dep-docs</code> + <code>dev:gen-lib-dep-docs</code></td><td><code>spc dev:gen-deps-data</code></td></tr></tbody></table><h2id="renamed-dev-commands"tabindex="-1">Renamed Dev Commands <aclass="header-anchor"href="#renamed-dev-commands"aria-label="Permalink to “Renamed Dev Commands”"></a></h2><tabletabindex="0"><thead><tr><th>v2</th><th>v3</th><th>Notes</th></tr></thead><tbody><tr><td><code>dev:sort-config</code> / <code>sort-config</code></td><td><code>dev:lint-config</code></td><td>Old alias still accepted</td></tr></tbody></table><h2id="new-commands-in-v3"tabindex="-1">New Commands in v3 <aclass="header-anchor"href="#new-commands-in-v3"aria-label="Permalink to “New Commands in v3”"></a></h2><p>These commands are new in v3 with no v2 equivalent:</p><tabletabindex="0"><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><code>spc reset</code></td><td>Clean <code>buildroot/</code> and <code>source/</code> directories</td></tr><tr><td><code>spc check-update</code></td><td>Check for newer artifact versions</td></tr><tr><td><code>spc build:php-cli</code></td><td>Build CLI SAPI (no flags needed)</td></tr><tr><td><code>spc build:php-fpm</code></td><td>Build PHP-FPM (no flags needed)</td></tr><tr><td><code>spc build:php-cgi
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> - </span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">my-patch.php</span></span></code></pre></div><h3id="libs-→-packages-both-work"tabindex="-1"><code>libs</code> → <code>packages</code> (both work) <aclass="header-anchor"href="#libs-→-packages-both-work"aria-label="Permalink to “libs → packages (both work)”"></a></h3><p>The top-level <code>libs</code> field still works. The preferred v3 field name is <code>packages</code>, which is a superset covering libraries and other tool packages:</p><divclass="language-yaml"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">yaml</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># v2</span></span>