Files
static-php-cli/assets/en_develop_index.md.CDPdLdXm.js
2026-05-11 05:18:54 +00:00

3 lines
4.4 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as i,c as t,o as a,aj as s}from"./chunks/framework.C2AwuPrQ.js";const k=JSON.parse('{"title":"Developer Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/index.md","filePath":"en/develop/index.md"}'),n={name:"en/develop/index.md"};function l(r,e,o,h,p,d){return a(),t("div",null,[...e[0]||(e[0]=[s(`<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&#39;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&#39;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&#39;s framework architecture.</p>`,15)])])}const u=i(n,[["render",l]]);export{k as __pageData,u as default};