Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
e316971
Fix cross-device warning in rename function
crazywhalecc Nov 29, 2025
e6591ff
add pcov extension (shared only, like xdebug)
henderkes Nov 29, 2025
14bfb41
v3 base
crazywhalecc Nov 30, 2025
6b3b841
Fix cross-device warning in rename function (#978)
henderkes Nov 30, 2025
59a6e27
add pcov extension (shared only, like xdebug) (#979)
henderkes Dec 1, 2025
5a0fd40
update libwebp and libxml2
henderkes Dec 1, 2025
7204d27
Update PHP extensions for Linux and Darwin
henderkes Dec 1, 2025
14b822a
don't build avx2 if we don't have it
henderkes Dec 1, 2025
d1041c5
remove openssl source/test dir (4.1gb?!)
henderkes Dec 1, 2025
7f863d1
don't remove dir, just don't build tests
henderkes Dec 1, 2025
b965ffc
don't build extra programs
henderkes Dec 1, 2025
c051a48
don't add -l:libstdc++.a if we're not actually using gcc/clang
henderkes Dec 1, 2025
150d866
revert turning off sse for libwebp, need to check why debian fails bu…
henderkes Dec 1, 2025
22d263c
maybe explicit mavx2?!
henderkes Dec 1, 2025
5b4f4f8
maybe?
henderkes Dec 1, 2025
b844407
update go-xcaddy version automatically
henderkes Dec 1, 2025
9903c22
Merge branch 'main' into v3-dev
crazywhalecc Dec 2, 2025
c38f174
Forward-port #978
crazywhalecc Dec 2, 2025
719d818
we need to check for structure of pdo_sqlsrv extension
henderkes Dec 2, 2025
98773ee
zig toolchain can always use libc
henderkes Dec 3, 2025
daa87e1
Add DirDiff utility and enhance package build process
crazywhalecc Dec 4, 2025
71d803d
cs fix
crazywhalecc Dec 4, 2025
2f8570b
Implement missing legacy options
crazywhalecc Dec 4, 2025
e9d3f7e
Change wrong option name
crazywhalecc Dec 4, 2025
20892ab
Auto-append prefix for php-extension packages
crazywhalecc Dec 4, 2025
dc5bf6d
Correct install-pkg argument name, add alias
crazywhalecc Dec 4, 2025
64fde5f
Allow loading config dir from registry
crazywhalecc Dec 4, 2025
ee46c1c
Fix switch-php-version command not working bug
crazywhalecc Dec 4, 2025
d16f5a9
Add --with-packages option for spc-config command
crazywhalecc Dec 4, 2025
c925914
Add version getter and checksum for go-xcaddy artifact
crazywhalecc Dec 5, 2025
52553fb
Fix PHPStan errors
crazywhalecc Dec 5, 2025
7fa6fd0
Add HostedPackageBin downloader and enhance artifact handling
crazywhalecc Dec 5, 2025
93a697e
Fix artifact downloader constants and improve error message for hoste…
crazywhalecc Dec 5, 2025
106b55d
[v3] Add musl-wrapper and musl-toolchain installation support (#984)
crazywhalecc Dec 5, 2025
66840a8
update xdebug to use pie sources
henderkes Dec 5, 2025
7bdcda1
gmp can't build with std=c23 (default with gcc 15)
henderkes Dec 5, 2025
6b5f702
ncurses can't build with std=c23 (default with gcc 15)
henderkes Dec 5, 2025
1d5aec0
c17 instead
henderkes Dec 5, 2025
b2182b4
use source extract hook for pdo_sqlsrv
henderkes Dec 5, 2025
47ab5d7
use c17 for extensions as well?
henderkes Dec 5, 2025
9ad7147
Enhance musl-wrapper and musl-toolchain installation process (#988)
crazywhalecc Dec 6, 2025
d3b0f5d
Fix argument naming in InstallPackageCommand for clarity (#989)
crazywhalecc Dec 6, 2025
dce63d3
we need extensions to explicitly tell which c std they need
henderkes Dec 6, 2025
2f09ace
Add LinuxToolCheck
crazywhalecc Dec 8, 2025
baddd60
Add dev commands: is-installed, shell (for debugging package status)
crazywhalecc Dec 8, 2025
dbc6dbe
Add Zig package support with downloader and installation checks
crazywhalecc Dec 8, 2025
88b86d3
Fix artifact downloade does not accept boolean options bug
crazywhalecc Dec 8, 2025
6775cb4
Fix pkg-config doctor fix using source bug
crazywhalecc Dec 8, 2025
3ff762c
Fix wrong namespace in go-xcaddy package
crazywhalecc Dec 8, 2025
df6c27c
Allow absolute paths for configs
crazywhalecc Dec 8, 2025
abd6c2f
Add PackageInstaller::isPackageInstalled() API
crazywhalecc Dec 8, 2025
eab1059
Remove redundant path
crazywhalecc Dec 8, 2025
127c935
Refactor BUILDROOT_ABS initialization to provide a default path (#991)
crazywhalecc Dec 8, 2025
a1cadec
Refactor re2c fix-item
crazywhalecc Dec 8, 2025
80d922a
Use patch for current package exclusively
crazywhalecc Dec 8, 2025
20e0711
Add libedit package build
crazywhalecc Dec 8, 2025
11e7a59
Add ncurses package build
crazywhalecc Dec 8, 2025
321f2e1
Allow all types of package can be built
crazywhalecc Dec 8, 2025
f4bb026
Fix ncurses static-libs
crazywhalecc Dec 8, 2025
b384345
Add php-micro patch for embed mode
crazywhalecc Dec 8, 2025
80128ed
Add patch description display
crazywhalecc Dec 8, 2025
78234ef
Add missing patchPkgconfPrefix function
crazywhalecc Dec 8, 2025
7b16f68
Allow package implementation using parent class functions
crazywhalecc Dec 8, 2025
a4bd2a7
Add shared extension build support
crazywhalecc Dec 8, 2025
0db26be
Correct SAPI-packages to be installed
crazywhalecc Dec 8, 2025
e004d10
Fix phpstan
crazywhalecc Dec 8, 2025
808aed2
Refactor package stage handling and update class structures for impro…
crazywhalecc Dec 9, 2025
ac01867
Refactor stage execution to use method references for improved clarity
crazywhalecc Dec 9, 2025
b0f630f
Add package outputs, colorize motd
crazywhalecc Dec 9, 2025
bcaef59
Support full --no-ansi options
crazywhalecc Dec 9, 2025
4a96875
Update src/Package/Library/ncurses.php
crazywhalecc Dec 10, 2025
f68adc3
Update src/Package/Target/php.php
crazywhalecc Dec 10, 2025
7837563
V3 feat/re2c (#992)
crazywhalecc Dec 10, 2025
bde1440
Refactor test structure and update paths for improved organization
crazywhalecc Dec 10, 2025
97e337c
Refactor test structure and update paths for improved organization (#…
crazywhalecc Dec 10, 2025
794d92c
Add early validation for package build and installation requirements
crazywhalecc Dec 10, 2025
2901d32
Update ApplicationContext and InteractiveTerm to handle null outputs …
crazywhalecc Dec 10, 2025
66d3af5
Add early validation for package build and installation requirements …
crazywhalecc Dec 10, 2025
458af6a
Add build function check for current OS and update validation logic
crazywhalecc Dec 10, 2025
dc05ad2
Update captain hook for windows
crazywhalecc Dec 10, 2025
a54021b
Apply suggestion from @henderkes
henderkes Dec 10, 2025
f0b5e4f
Fix typo in ncurses.php enable-symlinks option (#994)
crazywhalecc Dec 10, 2025
07ea1e2
update libwebp and libxml2 (#982)
henderkes Dec 10, 2025
3c89ce6
Update version to 2.7.10 (#997)
crazywhalecc Dec 10, 2025
2080407
Enhance Windows support by updating artifact configuration and improv…
crazywhalecc Dec 11, 2025
fe0b983
Fix debug mode and verbosity relation
crazywhalecc Dec 11, 2025
4bbe56d
Fix windows extracting with curl typo, ignore traits in package
crazywhalecc Dec 11, 2025
eb0a36e
Rename
crazywhalecc Dec 11, 2025
48fbeab
Add log for interactive term
crazywhalecc Dec 11, 2025
7c8b40a
Add windows php cli builds, support micro patches
crazywhalecc Dec 11, 2025
f6b47ad
Separate unix and windows build for php
crazywhalecc Dec 11, 2025
6d292b4
Add WindowsCMakeExecutor
crazywhalecc Dec 11, 2025
e3f9894
Apply copilot's suggestion
crazywhalecc Dec 11, 2025
c4cec15
Use container instead of passing
crazywhalecc Dec 11, 2025
da8b7c2
Use the real build target to display
crazywhalecc Dec 11, 2025
4e841cf
Update src/Package/Target/php/windows.php
crazywhalecc Dec 11, 2025
8bf2f42
Merge remote-tracking branch 'origin/v3-feat/win' into v3-feat/win
crazywhalecc Dec 11, 2025
9a91aec
Update src/Package/Target/php/windows.php
crazywhalecc Dec 11, 2025
a4fd618
Update src/StaticPHP/Artifact/Artifact.php
crazywhalecc Dec 11, 2025
355da34
Merge remote-tracking branch 'origin/v3-feat/win' into v3-feat/win
crazywhalecc Dec 11, 2025
63c7aa8
Update captainhook.json to cross-platform friendly
crazywhalecc Dec 11, 2025
f8952da
Update captainhook.json to cross-platform friendly
crazywhalecc Dec 11, 2025
88d135a
Allow interrupt on Windows
crazywhalecc Dec 11, 2025
fefcbf4
Allow automatically get latest gRPC source (#909)
crazywhalecc Dec 11, 2025
910f10a
Typo
crazywhalecc Dec 11, 2025
c1c31a7
V3 feat/win (#999)
crazywhalecc Dec 11, 2025
acd0e2b
Prepare for skeleton
crazywhalecc Dec 15, 2025
d064e13
the libwebp 1.6.0 bug affects centos 7 too
henderkes Dec 15, 2025
18c5ccf
the libwebp 1.6.0 bug affects centos 7 too (#1004)
henderkes Dec 16, 2025
1707c67
Sort
crazywhalecc Dec 18, 2025
dd5762f
Add lib skeleton command and sort config, spc_mode suuport, etc...
crazywhalecc Dec 18, 2025
9fdfef5
macOS don't need to disable avx2 explicitly (#1007)
crazywhalecc Dec 18, 2025
656a58c
remove source dir after successful build in CI environment
henderkes Dec 18, 2025
0247458
we were installing to wrong dir if source name != lib name
henderkes Dec 18, 2025
ce44e00
@crazywhalecc how to use patch points to delete source dirs?
henderkes Dec 18, 2025
037d224
why does phpstan think this is necessary?
henderkes Dec 18, 2025
e677be7
remove
henderkes Dec 18, 2025
9e051c8
fix: check for link first before checking for is_dir
henderkes Dec 18, 2025
e1a14bb
fix implicit include
henderkes Dec 18, 2025
53f7cde
fix swoole compilation with php 8.5.1
henderkes Dec 18, 2025
6b52000
fix downloader selecting drafts
henderkes Dec 20, 2025
f7ca621
Test
crazywhalecc Dec 26, 2025
8650ce4
Add MACOSX_DEPLOYMENT_TARGET to env.ini (#1009)
crazywhalecc Dec 26, 2025
9a681a9
add mariadb mysqlnd plugins
henderkes Dec 27, 2025
09b89a3
WIP: use system libraries for grpc without building our own grpc lib
henderkes Dec 27, 2025
e952f1c
we don't even need to build grpc library for grpc extension...
henderkes Dec 27, 2025
5ef4623
grpc will fail for php 8.5, it's not updated yet
henderkes Dec 27, 2025
93a3590
factor grpc extension out to ext-grpc, keep library for now, even tho…
henderkes Dec 28, 2025
2f31226
make grpc php 8.5 compatible
henderkes Dec 28, 2025
e7a88f1
enable fat for gmp when next version releases
henderkes Dec 29, 2025
08388c0
force enable tailcall vm with zig
henderkes Dec 29, 2025
7688a55
don't get zig master branch
henderkes Dec 29, 2025
022fdb2
fix no-strip
henderkes Dec 29, 2025
a06cc32
pin libpng to released tags, not git
henderkes Dec 30, 2025
64f7a35
don't need it anymore
henderkes Jan 1, 2026
d1b1949
use OPENSSL_CONF directory for openssl default configuration
henderkes Jan 2, 2026
fff2484
postgresql doesn't build under c23
henderkes Jan 2, 2026
559a290
use little trick to order libargon2 before libsodium
henderkes Jan 2, 2026
890ff47
our memcache patch prevents shared building
henderkes Jan 3, 2026
54001ab
simplify logic a bit
henderkes Jan 3, 2026
1be353f
more concise message
henderkes Jan 3, 2026
76025b9
missing space
henderkes Jan 3, 2026
6bbb3c9
remove -release handling functionality
henderkes Jan 3, 2026
f8b0c2c
add release thing to extension build too
henderkes Jan 3, 2026
94644d3
fix
henderkes Jan 3, 2026
3a17cec
deploy extensions with -release flag too
henderkes Jan 3, 2026
34910d1
add patch point for shared ext build
henderkes Jan 4, 2026
cd2dc5b
Fix nghttp2 and curl build configurations for static linking (#1014)
crazywhalecc Jan 13, 2026
d902e70
fix arm64 builds
henderkes Jan 16, 2026
b09337d
add excimer extension
henderkes Jan 17, 2026
0b863cb
Merge branch 'main' into feat/excimer
henderkes Jan 17, 2026
19f9417
zig now supports -Wl,-exported_symbols_list
henderkes Jan 17, 2026
1e2b401
test excimer
henderkes Jan 17, 2026
ae0217b
add excimer extension (#1018)
henderkes Jan 19, 2026
af75ffa
suggestions, change openssldir
henderkes Jan 19, 2026
6cf4c40
Merge remote-tracking branch 'origin/main' into henderkes-patch-1
henderkes Jan 19, 2026
372760e
Update patch point docs
crazywhalecc Jan 19, 2026
b3c4502
up version
henderkes Jan 19, 2026
1c28f0f
bunch of fixes/changes to make packages build (#1006)
henderkes Jan 19, 2026
cfb8cc9
Merge branch 'main' into v3-feat/skeleton
crazywhalecc Jan 20, 2026
2c22bf2
Refactor getOSRelease method for improved readability and efficiency
crazywhalecc Jan 20, 2026
a0cab24
Remove skeleton command
crazywhalecc Jan 22, 2026
75cfd7e
3.0 Enhancement
crazywhalecc Jan 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Tests

on:
pull_request:
branches: [ "main" ]
branches: [ "main", "v3" ]
types: [ opened, synchronize, reopened ]
paths:
- 'src/**'
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.idea
runtime/
docker/libraries/
docker/extensions/
docker/source/
/runtime/
/docker/libraries/
/docker/extensions/
/docker/source/

# Vendor files
/vendor/**
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@
'php_unit_data_provider_method_order' => false,
])
->setFinder(
PhpCsFixer\Finder::create()->in([__DIR__ . '/src', __DIR__ . '/tests/SPC'])
PhpCsFixer\Finder::create()->in([__DIR__ . '/src', __DIR__ . '/tests/StaticPHP'])
)
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());
23 changes: 9 additions & 14 deletions bin/spc
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
#!/usr/bin/env php
<?php

use SPC\ConsoleApplication;
use SPC\exception\ExceptionHandler;

// Load custom php if exists
if (PHP_OS_FAMILY !== 'Windows' && PHP_BINARY !== (__DIR__ . '/php') && file_exists(__DIR__ . '/php') && is_executable(__DIR__ . '/php')) {
pcntl_exec(__DIR__ . '/php', $argv);
}
use StaticPHP\ConsoleApplication;
use StaticPHP\Exception\ExceptionHandler;
use StaticPHP\Exception\SPCException;

if (file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
// Current: ./bin (git/project mode)
Expand All @@ -17,19 +13,18 @@ if (file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
require_once dirname(__DIR__, 3) . '/autoload.php';
}

// 防止 Micro 打包状态下不支持中文的显示(虽然这个项目目前好像没输出过中文?)
if (PHP_OS_FAMILY === 'Windows' && Phar::running()) {
exec('CHCP 65001');
}

// Print deprecation notice on PHP < 8.4, use red and highlight background
if (PHP_VERSION_ID < 80400) {
echo "\e[43mDeprecation Notice: PHP < 8.4 is deprecated, please upgrade your PHP version.\e[0m\n";
}

try {
(new ConsoleApplication())->run();
} catch (Exception $e) {
ExceptionHandler::getInstance()->handle($e);
} catch (SPCException $e) {
ExceptionHandler::handleSPCException($e);
exit(1);
} catch (\Throwable $e) {
ExceptionHandler::handleDefaultException($e);
exit(1);
}

6 changes: 3 additions & 3 deletions bin/spc-alpine-docker
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

# This file is using docker to run commands
SPC_DOCKER_VERSION=v6
SPC_DOCKER_VERSION=v7

# Detect docker can run
if ! which docker >/dev/null; then
Expand Down Expand Up @@ -108,8 +108,7 @@ RUN apk update; \
wget \
xz \
gettext-dev \
binutils-gold \
patchelf
binutils-gold

RUN curl -#fSL https://dl.static-php.dev/static-php-cli/bulk/php-8.4.4-cli-linux-\$(uname -m).tar.gz | tar -xz -C /usr/local/bin && \
chmod +x /usr/local/bin/php
Expand All @@ -123,6 +122,7 @@ COPY ./composer.* /app/
ADD ./bin /app/bin
RUN composer install --no-dev
ADD ./config /app/config
ADD ./spc.registry.json /app/spc.registry.json
RUN bin/spc doctor --auto-fix
RUN bin/spc install-pkg upx

Expand Down
4 changes: 4 additions & 0 deletions bin/spc-debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# This script runs the 'spc' command with Xdebug enabled for debugging purposes.
php -d xdebug.mode=debug -d xdebug.client_host=127.0.0.1 -d xdebug.client_port=9003 -d xdebug.start_with_request=yes "$(dirname "$0")/../bin/spc" "$@"
5 changes: 0 additions & 5 deletions bin/spc-gnu-docker
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ RUN echo "source scl_source enable devtoolset-10" >> /etc/bashrc
RUN source /etc/bashrc
RUN yum install -y which

RUN curl -fsSL -o patchelf.tgz https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-$SPC_USE_ARCH.tar.gz && \
mkdir -p /patchelf && \
tar -xzf patchelf.tgz -C /patchelf --strip-components=1 && \
cp /patchelf/bin/patchelf /usr/bin/

RUN curl -o cmake.tgz -#fSL https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-$SPC_USE_ARCH.tar.gz && \
mkdir /cmake && \
tar -xzf cmake.tgz -C /cmake --strip-components 1
Expand Down
88 changes: 44 additions & 44 deletions captainhook.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"pre-push": {
"enabled": true,
"actions": [
{
"action": "composer analyse"
}
]
},
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "composer cs-fix -- --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php}",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
}
]
},
"post-change": {
"enabled": true,
"actions": [
{
"action": "composer install",
"options": [],
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
"args": [
[
"composer.json",
"composer.lock"
]
]
}
]
}
]
}
}
{
"pre-push": {
"enabled": true,
"actions": [
{
"action": "php vendor/bin/phpstan analyse --memory-limit 300M"
}
]
},
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php} --sequential",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
}
]
},
"post-change": {
"enabled": true,
"actions": [
{
"action": "composer install",
"options": [],
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
"args": [
[
"composer.json",
"composer.lock"
]
]
}
]
}
]
}
}
14 changes: 9 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
}
],
"require": {
"php": ">= 8.3",
"php": ">=8.4",
"ext-mbstring": "*",
"ext-zlib": "*",
"laravel/prompts": "^0.1.12",
"laravel/prompts": "~0.1",
"nette/php-generator": "^4.2",
"php-di/php-di": "^7.1",
"symfony/console": "^5.4 || ^6 || ^7",
"symfony/process": "^7.2",
"symfony/yaml": "^7.2",
"zhamao/logger": "^1.1.3"
"zhamao/logger": "^1.1.4"
},
"require-dev": {
"captainhook/captainhook-phar": "^5.23",
Expand All @@ -28,7 +30,9 @@
},
"autoload": {
"psr-4": {
"SPC\\": "src/SPC"
"SPC\\": "src/SPC",
"StaticPHP\\": "src/StaticPHP",
"Package\\": "src/Package"
},
"files": [
"src/globals/defines.php",
Expand All @@ -37,7 +41,7 @@
},
"autoload-dev": {
"psr-4": {
"SPC\\Tests\\": "tests/SPC"
"Tests\\StaticPHP\\": "tests/StaticPHP"
}
},
"bin": [
Expand Down
Loading
Loading