mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-19 14:55:35 +08:00
2 lines
4.4 KiB
JavaScript
2 lines
4.4 KiB
JavaScript
import{G as e,K as t,at as n,j as r}from"./chunks/framework.DrNIf5Lg.js";var i=JSON.parse(`{"title":"Developer Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/index.md","filePath":"en/develop/index.md"}`),a={name:`en/develop/index.md`};function o(r,i,a,o,s,c){return n(),e(`div`,null,[...i[0]||=[t(`<h1 id="developer-guide" tabindex="-1">Developer Guide <a class="header-anchor" href="#developer-guide" aria-label="Permalink to “Developer Guide”"></a></h1><p>This section covers the StaticPHP development workflow and the foundational knowledge needed to understand how StaticPHP works under the hood.</p><h2 id="overview" tabindex="-1">Overview <a class="header-anchor" href="#overview" aria-label="Permalink to “Overview”"></a></h2><p>StaticPHP is a binary build tool whose core purpose is managing the build pipeline — downloading and configuring PHP source code, resolving extension dependencies, and invoking the underlying build system (e.g., Docker or a local compiler).</p><p>From a development perspective, StaticPHP is an open framework that provides the ability to statically build PHP and other open-source tools together. The project is maintained by <a href="https://github.com/crazywhalecc" target="_blank" rel="noreferrer">@crazywhalecc</a> and <a href="https://github.com/henderkes" target="_blank" rel="noreferrer">@henderkes</a>, with contributions from the community.</p><p>You can think of StaticPHP as a typical PHP CLI project built on <a href="https://symfony.com/doc/current/components/console.html" target="_blank" rel="noreferrer">symfony/console</a>.</p><h2 id="development-environment" tabindex="-1">Development Environment <a class="header-anchor" href="#development-environment" aria-label="Permalink to “Development Environment”"></a></h2><p>To get started with StaticPHP development, you'll need a PHP development environment with the required dependencies installed.</p><p>Requirements:</p><ul><li>PHP 8.4 or later</li><li>Composer</li><li>Git</li><li>PHP extensions: <code>curl, dom, filter, mbstring, openssl, pcntl, phar, posix, sodium, tokenizer, xml, xmlwriter</code></li></ul><blockquote><p>These PHP extensions are required for StaticPHP's <code>dev</code> environment.</p></blockquote><h3 id="setup-steps" tabindex="-1">Setup Steps <a class="header-anchor" href="#setup-steps" aria-label="Permalink to “Setup Steps”"></a></h3><ol><li><p>Clone the repository:</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/crazywhalecc/static-php-cli.git</span></span>
|
||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> static-php-cli</span></span></code></pre></div></li><li><p>Install PHP dependencies:</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">composer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span></code></pre></div></li><li><p>Verify the setup:</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --version</span></span></code></pre></div></li></ol><hr><p>You can continue reading <a href="./structure.html">Project Structure</a> to learn more about StaticPHP's framework architecture.</p>`,15)]])}var s=r(a,[[`render`,o]]);export{i as __pageData,s as default}; |