crazywhalecc/static-php-cli
Static PHP CLI builds standalone, statically linked PHP binaries with selected extensions for Linux, macOS, and Windows, making it easy to package and distribute PHP applications without runtime dependencies.
crazywhalecc/static-php-cli (spc) is not a Composer-importable Laravel package in the conventional sense — it is a PHP-based build orchestrator that compiles fully static PHP binaries (with a curated set of ~80+ extensions) and can bundle application source via micro.sfx into a single executable. Treat it as infrastructure tooling, not a runtime dependency.
Release 2.8.5 delta (reviewed): a maintenance patch with no breaking changes, no deprecations, and no config schema changes. It is additive and corrective: two new extensions (decimal, deepclone), a Windows fix for PostgreSQL library/header path copying, a macOS build fix for xlswriter under modern Clang (C23), a Linux Mint variant mapping, and — the operationally interesting part — removal of the zig < 0.16 workaround plus a fix for an aarch64 shared-extension segfault under zig 0.16.0, alongside libkrb5/decimal build repairs. Net read for a TPM: low upgrade risk, mild positive on extension coverage, and fresh evidence that the cross-compile toolchain (zig) is a moving part that must be pinned.
Dependents: 0 metric is misleading: consumption happens via phar/binary in CI, not composer require, so the real user base (FrankenPHP, php-cs-fixer, PHPStan, Psalm distribution builds) is invisible to that counter. 2.8.5 does not change this positioning; decimal (arbitrary-precision decimals) is a genuine addition for financial/ledger-style CLI jobs that previously needed bcmath gymnastics, and deepclone is niche.cli, micro, fpm, embed), and extensions. Determinism improved markedly with lockfile support in recent v2.x releases, and 2.8.5's zig-version work is a reminder to pin the toolchain, not just the PHP version. The friction remains toolchain prerequisites (autoconf, bison, re2c, cmake, pkg-config, musl-cross-make or a pinned zig) and build duration — tens of minutes per target, CPU-heavy.aarch64 segfault under zig 0.16.0 is exactly the class of defect that appears on one architecture only; treat zig/musl versions as pinned, tested artifacts.spc is already in the dependency graph)? Which extensions are non-negotiable (e.g., pdo_mysql, intl, redis, swoole, and now possibly decimal)? Is reproducible build + SBOM attestation a compliance requirement, and does it extend to pinning the C toolchain? Who owns the build pipeline and its CI minutes? What is the acceptable lag between a PHP security release and a rebuilt artifact? Are you building for aarch64 as well as x86_64 (which doubles the toolchain risk surface)?spc currently compiles (8.0–8.5). It slots in as a CI job, not an application service provider; no autoload, no config publishing, no migrations. Upgrading 2.8.4 → 2.8.5 is a pin bump; nothing in the release changes invocation or config shape.spc transitively and should evaluate FrankenPHP directly rather than spc in isolation. Teams wanting binary CLI distribution add a single CI stage: spc fetch → build with a pinned extension set and pinned toolchain → sign artifact → publish. 2.8.5 does not force a pipeline redesign; it does force a review of the pinned zig version in your build image if you had retained the < 0.16 workaround path.composer.json platform requirements and Laravel's own extension needs (mbstring, openssl, pdo_*, tokenizer, ctype, json, fileinfo, bcmath, curl). The new decimal extension is opt-in and additive — adding it widens the binary slightly, so only include it if a workload requires it. Note behavioral differences under musl (DNS resolution, locale handling) versus glibc — test in the target environment, not just locally, and test on aarch64 explicitly given the 2.8.5 shared-extension fix history.spc version + lockfile. 3) Stand up a dedicated Docker build image in CI with pinned zig/musl toolchain versions. 4) Add artifact signing and checksum publication. 5) Evaluate micro.sfx bundling only after the base pipeline is stable. 6) Revisit FrankenPHP/Octane as a separate, later workstream. Rolling to 2.8.5 is a low-ceremony step 2 activity: bump the pin, rebuild, run the binary smoke suite on both architectures.x86_64 + aarch64) roughly double build cost and are where 2.8.5's defects surfaced. Artifact size (tens of MB per binary, larger with micro.sfx) constrains distribution channels — CDN and download UX need planning. Runtime scaling is unaffected since the artifact runs as a normal process.decimal and libkrb5); toolchain-version regressions such as the aarch64 zig 0.16.0 segfault; musl/glibc behavioral divergence surfacing only in production; oversized artifacts rejected by distribution infrastructure; silent staleness where a deployed binary embeds an outdated OpenSSL. Mitigations: pinned versions (PHP, spc, and C toolchain), scheduled rebuilds, automated smoke tests of the produced binary against your Laravel test suite on every target architecture, and artifact provenance metadata.How can I help you explore Laravel packages today?