Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
ad356b4
Fix grpc build
crazywhalecc Mar 9, 2026
16e772e
add back in zig workaround as 0.16.x is not released yet
henderkes Mar 10, 2026
b690566
simplify rm command
henderkes Mar 10, 2026
f93ad27
allow using some libs as system provided (work around mssql linking v…
henderkes Mar 10, 2026
2277390
fix removeConfigureArgs in UnixAutoconfExecutor.php
henderkes Mar 10, 2026
1edf14e
set custom binary name for frankenphp
henderkes Mar 10, 2026
5d5a50a
Update src/SPC/builder/LibraryBase.php
henderkes Mar 10, 2026
9634b8b
set custom binary name for frankenphp, allow linking against system o…
henderkes Mar 10, 2026
4fa5292
Use custom config.m4 for grpc extension
crazywhalecc Mar 10, 2026
086c855
Use custom config.m4 for grpc extension
crazywhalecc Mar 10, 2026
2350d2d
Merge branch 'main' into fix/grpc-build
crazywhalecc Mar 10, 2026
92f5b56
fix: FrankenPHP build args
dunglas Mar 10, 2026
e31f648
fix: FrankenPHP build args (#1057)
henderkes Mar 10, 2026
281b958
Fix grpc build (#1055)
crazywhalecc Mar 10, 2026
e49a5d7
make php 8.5 default
henderkes Mar 11, 2026
901da8f
remove ldtl from odbc libs private (using built in ltdl)
henderkes Mar 11, 2026
ef4b299
test
henderkes Mar 11, 2026
a335d05
cs fix
henderkes Mar 11, 2026
70285cb
actually update to 8.5
henderkes Mar 11, 2026
a232f57
test bulk
henderkes Mar 11, 2026
1b8b53d
update swoole args for 6.2
henderkes Mar 11, 2026
1049a3c
curl is always supported now (swoole no longer supports php < 8.1)
henderkes Mar 11, 2026
1fcb74a
swoole-ftp conflicts with ftp
henderkes Mar 11, 2026
85b0cd8
only disable when building ftp static, shared is fine
henderkes Mar 11, 2026
4625c6a
update default php version to 8.5 (#1058)
henderkes Mar 11, 2026
60b2aea
fix libde265 on ancient debian OS?
henderkes Mar 18, 2026
463ec54
Merge branch 'main' into fix/lide265
henderkes Mar 18, 2026
f2fa298
why is it not failing here?
henderkes Mar 18, 2026
823fe96
attempt
henderkes Mar 18, 2026
5491502
Fix zlib produced lib file names from different zlib version (#1066)
crazywhalecc Mar 20, 2026
b970bf8
Fix gd build on PHP 8.5 (#1043)
crazywhalecc Mar 20, 2026
295df19
Add shared-extensions, frankenphp and zts to build-unix workflow (#1062)
N-Silbernagel Mar 20, 2026
5404926
Merge branch 'main' into fix/lide265
henderkes Mar 20, 2026
4c6b7a3
fix libde265 on ancient debian OS (#1064)
henderkes Mar 20, 2026
963e2a0
Add Windows builders for libaom and brotli libraries
Mar 22, 2026
c03508a
Improve zlib Windows library detection for future zlib versions (#1070)
hmennen90 Mar 22, 2026
864678a
Merge branch 'main' into feat/windows-libaom-brotli
hmennen90 Mar 22, 2026
a99b6be
Remove freetype useless lib suggestions
crazywhalecc Mar 23, 2026
d076df6
Bump version number
crazywhalecc Mar 23, 2026
d35cbd7
Add Windows builders for libaom and brotli (#1072)
crazywhalecc Mar 23, 2026
13a15b1
Use alpha1 as version number
crazywhalecc Mar 24, 2026
2fa0770
Fix zlib extension wrong arg
crazywhalecc Mar 24, 2026
94dd44e
Add ext-amqp
crazywhalecc Mar 24, 2026
ecf712b
hard code protobuf version while we're on v2
henderkes Mar 26, 2026
766f7fa
hard code protobuf version while we're on v2 (#1075)
henderkes Mar 26, 2026
844bb69
Fix ext-curl implementation
crazywhalecc Mar 27, 2026
daae5f2
libjpeg-turbo mustn't compile zlib symbols on its own
henderkes Mar 29, 2026
8f7897e
test
henderkes Mar 29, 2026
5a5f54b
brilliant to test php 8.1
henderkes Mar 29, 2026
d535e4f
libjpeg-turbo mustn't compile zlib symbols on its own (#1077)
henderkes Mar 30, 2026
b96586e
Add curl extension and enhance Windows build process
crazywhalecc Mar 31, 2026
d316ea8
Merge branch 'main' into v3-refactor/win-exts
crazywhalecc Mar 31, 2026
a7184d0
Fix sqlsrv redundant cflags when building PHP
crazywhalecc Apr 2, 2026
e592488
Add test
crazywhalecc Apr 2, 2026
cae668a
Remove zstd suggested libs for v2 (implemented on v3)
crazywhalecc Apr 2, 2026
08a6bf3
Remove zstd suggested libs for v2 (implemented on v3)
crazywhalecc Apr 2, 2026
3ded988
Disable openssl for ngtcp2 temporarily
crazywhalecc Apr 3, 2026
852a043
Disable openssl for ngtcp2 temporarily
crazywhalecc Apr 3, 2026
c339b90
Disable simd for libjpeg
crazywhalecc Apr 3, 2026
e5ad722
Add brotli to curl (just workaround for transitive deps)
crazywhalecc Apr 3, 2026
1a476d0
Fix xcopy command in FileSystem.php by removing the 'v' flag
crazywhalecc Apr 3, 2026
fb8f8d4
Correct openssl test script condition
crazywhalecc Apr 3, 2026
51b8a0c
Fix upx packing for win
crazywhalecc Apr 3, 2026
c671cfd
Add cli, cgi, micro output
crazywhalecc Apr 3, 2026
e5e6e26
Add cli, cgi, micro output
crazywhalecc Apr 3, 2026
cd3eb3d
Update src/globals/ext-tests/openssl.php
crazywhalecc Apr 3, 2026
820d77b
[v2] Fix bunch of build bugs for Windows (#1078)
crazywhalecc Apr 3, 2026
0b2b1d5
Fix file paths for SQLSRV
crazywhalecc Apr 4, 2026
fef3612
Fix file paths for SQLSRV (#1081)
henderkes Apr 4, 2026
ddb9e3e
add framework coreservices to watcher library
henderkes Apr 4, 2026
d411fac
add framework coreservices to watcher library (#1082)
crazywhalecc Apr 4, 2026
991da26
Enhance CMake configuration with dynamic linker flags for target pack…
crazywhalecc Apr 6, 2026
f8d24e2
Refactor package resolution to filter only available build artifacts
crazywhalecc Apr 6, 2026
85b9f5e
Refactor package resolution to filter only available build artifacts
crazywhalecc Apr 6, 2026
028aa45
Merge remote-tracking branch 'origin/v3-refactor/win-exts' into v3-re…
crazywhalecc Apr 6, 2026
8fa27ae
Enhance spc-debug script to support Xdebug profiling mode
crazywhalecc Apr 7, 2026
8e91e02
Add suggestion for ext-yaml to improve YAML config file parsing
crazywhalecc Apr 7, 2026
baa21d6
Implement caching for config file parsing to improve performance
crazywhalecc Apr 7, 2026
30c9a3f
phpstan
crazywhalecc Apr 7, 2026
76fc5ab
Apply v2 patch for xlswriter
crazywhalecc Apr 8, 2026
921870e
Update composer.lock
crazywhalecc Apr 8, 2026
ee854ee
Refactor extension configuration and improve Windows build support
crazywhalecc Apr 8, 2026
2a80d5a
Merge branch 'main' into v3-refactor/win-exts
crazywhalecc Apr 8, 2026
a3624b1
Forward-port #1078, add sqlsrv and pdo_sqlsrv extension support for win
crazywhalecc Apr 8, 2026
ad631f9
Add pdo_sqlsrv, libyaml patches from v2
crazywhalecc Apr 8, 2026
9a0d239
Add gettext-win
crazywhalecc Apr 8, 2026
d7ee946
Add mpir for windows gmp support
crazywhalecc Apr 8, 2026
2bc0d05
Add ext-gettext for Windows
crazywhalecc Apr 8, 2026
a5a3a99
Use legacy --enable-micro-win32 way to workaround
crazywhalecc Apr 8, 2026
097af80
Add OS support checks to PhpExtensionPackage
crazywhalecc Apr 8, 2026
c207269
Add php extension OS support checks to PackageInstaller
crazywhalecc Apr 8, 2026
9182cf1
Add ext-glfw support for Windows
crazywhalecc Apr 8, 2026
2f260e4
Add moveFileOrDir method to handle cross-device file and directory moves
crazywhalecc Apr 8, 2026
9b8e0c7
Update getBinaryExtractConfig to handle 'hosted' cache extraction path
crazywhalecc Apr 9, 2026
1bee20a
Add Windows build configuration support for opcache extension
crazywhalecc Apr 9, 2026
ee2e887
Add ext-gd, ext-iconv, ext-intl for windows
crazywhalecc Apr 9, 2026
4d73af4
Add ext-odbc, ext-pdo_odbc for windows
crazywhalecc Apr 9, 2026
6630fbd
Fix sqlsrv build configuration for Windows by removing /sdl, /W4, and…
crazywhalecc Apr 9, 2026
39f6a62
Limit password-argon2, pcntl to unix only
crazywhalecc Apr 9, 2026
402e105
Add ext-pgsql, ext-pdo_pgsql
crazywhalecc Apr 9, 2026
3805c06
Limit posix to unix-only
crazywhalecc Apr 9, 2026
6315490
Add wineditline
crazywhalecc Apr 9, 2026
2256f47
Add ext-readline for windows
crazywhalecc Apr 9, 2026
1d0ccde
Refactor micro:combine command on v3
crazywhalecc Apr 9, 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
79 changes: 77 additions & 2 deletions .github/workflows/build-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ on:
description: Extensions to build (comma separated)
required: true
type: string
shared-extensions:
description: Shared extensions to build (optional, comma separated)
type: string
extra-libs:
description: Extra libraries to build (optional, comma separated)
type: string
Expand All @@ -42,6 +45,14 @@ on:
build-fpm:
description: Build fpm binary
type: boolean
build-frankenphp:
description: Build frankenphp binary (requires ZTS)
type: boolean
default: false
enable-zts:
description: Enable ZTS
type: boolean
default: false
prefer-pre-built:
description: Prefer pre-built binaries (reduce build time)
type: boolean
Expand Down Expand Up @@ -73,6 +84,9 @@ on:
description: Extensions to build (comma separated)
required: true
type: string
shared-extensions:
description: Shared extensions to build (optional, comma separated)
type: string
extra-libs:
description: Extra libraries to build (optional, comma separated)
type: string
Expand All @@ -86,6 +100,14 @@ on:
build-fpm:
description: Build fpm binary
type: boolean
build-frankenphp:
description: Build frankenphp binary (requires ZTS)
type: boolean
default: false
enable-zts:
description: Enable ZTS
type: boolean
default: false
prefer-pre-built:
description: Prefer pre-built binaries (reduce build time)
type: boolean
Expand Down Expand Up @@ -152,8 +174,19 @@ jobs:
RUNS_ON="macos-15"
;;
esac
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=${{ inputs.extensions }} --ignore-cache-sources=php-src"
BUILD_CMD="$BUILD_CMD ${{ inputs.extensions }}"
STATIC_EXTS="${{ inputs.extensions }}"
SHARED_EXTS="${{ inputs['shared-extensions'] }}"
BUILD_FRANKENPHP="${{ inputs['build-frankenphp'] }}"
ENABLE_ZTS="${{ inputs['enable-zts'] }}"
ALL_EXTS="$STATIC_EXTS"
if [ -n "$SHARED_EXTS" ]; then
ALL_EXTS="$ALL_EXTS,$SHARED_EXTS"
fi
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=$ALL_EXTS --ignore-cache-sources=php-src"
BUILD_CMD="$BUILD_CMD $STATIC_EXTS"
if [ -n "$SHARED_EXTS" ]; then
BUILD_CMD="$BUILD_CMD --build-shared=$SHARED_EXTS"
fi
if [ -n "${{ inputs.extra-libs }}" ]; then
DOWN_CMD="$DOWN_CMD --for-libs=${{ inputs.extra-libs }}"
BUILD_CMD="$BUILD_CMD --with-libs=${{ inputs.extra-libs }}"
Expand All @@ -177,6 +210,12 @@ jobs:
if [ ${{ inputs.build-fpm }} == true ]; then
BUILD_CMD="$BUILD_CMD --build-fpm"
fi
if [ "$BUILD_FRANKENPHP" = "true" ]; then
BUILD_CMD="$BUILD_CMD --build-frankenphp"
fi
if [ "$ENABLE_ZTS" = "true" ]; then
BUILD_CMD="$BUILD_CMD --enable-zts"
fi
echo 'download='"$DOWN_CMD" >> "$GITHUB_OUTPUT"
echo 'build='"$BUILD_CMD" >> "$GITHUB_OUTPUT"
echo 'run='"$RUNS_ON" >> "$GITHUB_OUTPUT"
Expand All @@ -199,6 +238,27 @@ jobs:
env:
phpts: nts

- if: ${{ inputs['build-frankenphp'] == true }}
name: "Install go-xcaddy for FrankenPHP"
run: |
case "${{ inputs.os }}" in
linux-x86_64|linux-aarch64)
./bin/spc-alpine-docker install-pkg go-xcaddy
;;
linux-x86_64-glibc|linux-aarch64-glibc)
./bin/spc-gnu-docker install-pkg go-xcaddy
;;
macos-x86_64|macos-aarch64)
composer update --no-dev --classmap-authoritative
./bin/spc doctor --auto-fix
./bin/spc install-pkg go-xcaddy
;;
*)
echo "Unsupported OS for go-xcaddy install: ${{ inputs.os }}"
exit 1
;;
esac

# Cache downloaded source
- id: cache-download
uses: actions/cache@v4
Expand Down Expand Up @@ -245,7 +305,22 @@ jobs:
name: php-fpm-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/php-fpm

# Upload frankenphp executable
- if: ${{ inputs['build-frankenphp'] == true }}
name: "Upload FrankenPHP SAPI"
uses: actions/upload-artifact@v4
with:
name: php-frankenphp-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/frankenphp

# Upload extensions metadata
- if: ${{ inputs['shared-extensions'] != '' }}
name: "Upload shared extensions"
uses: actions/upload-artifact@v4
with:
name: php-shared-ext-${{ inputs.php-version }}-${{ inputs.os }}
path: |
buildroot/modules/*.so
- uses: actions/upload-artifact@v4
name: "Upload License Files"
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ spc.exe

# dumped files from StaticPHP v3
/dump-*.json

# config parse cache
/.spc.cache.php
57 changes: 57 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# v3 TODO List

Tracking items identified during the v2 → v3 migration audit.

---

## Commands

- [ ] Implement `craft` command (drives full build from `craft.yml`; should be easier with v3 vendor/registry mode)
- [x] Migrate `micro:combine` command (combine `micro.sfx` with PHP code + INI injection)
- [ ] Implement `dump-extensions` command (extract required extensions from `composer.json` / `composer.lock`)
- [ ] Design and implement v3 dev toolchain commands (WIP — needs design decision):
- [ ] `dev:extensions` / equivalent listing command
- [ ] `dev:php-version`, `dev:ext-version`, `dev:lib-version`
- [ ] Doc generation commands (`dev:gen-ext-docs`, `dev:gen-ext-dep-docs`, `dev:gen-lib-dep-docs`) — pending v3 doc design

---

## Source Patches (SourcePatcher → Artifact migration)

The following v2 `SourcePatcher` hooks are not yet migrated to v3 `src/Package/Artifact/` classes:

- [ ] Migrate `patchSQLSRVWin32` — removes `/sdl` compile flag to prevent Zend build failure on Windows
- [ ] Migrate `patchSQLSRVPhp85` — fixes `pdo_sqlsrv` directory layout for PHP 8.5
- [ ] Migrate `patchYamlWin32` — patches `config.w32` `_a.lib` detection logic for the `yaml` extension
- [ ] Migrate `patchImagickWith84` — applies PHP 8.4 compatibility patch for `imagick` based on version detection

---

## Extension Package Classes (Unix)

Extensions that had non-trivial v2 build logic and are missing a v3 `src/Package/Extension/` class:

- [x] `gettext` — macOS: fix `config.m4` bracket syntax for cross-version compatibility + append frameworks to linker flags (critical for macOS linking; this is a Unix-side gap, not Windows-only)

---

## Windows Extensions (Early Stage)

Windows extension support is still in early stage. The following extensions had Windows-specific configure args or patches in v2 and are pending v3 Windows implementation:

- [ ] `amqp` — Windows configure args
- [ ] `com_dotnet` — Windows-only extension
- [ ] `dom` — remove `dllmain.c` from `config.w32`
- [ ] `ev` — fix `PHP_EV_SHARED` in `config.w32`
- [ ] `gmssl` — add `CHECK_LIB("gmssl.lib")` to `config.w32`
- [ ] `intl` — fix `PHP_INTL_SHARED` in `config.w32`
- [ ] `lz4` — Windows configure args
- [ ] `mbregex` — Windows configure args
- [ ] `sqlsrv` / `pdo_sqlsrv` — complex conditional build logic (independent `sqlsrv` without `pdo_sqlsrv`)
- [ ] `xml` — remove `dllmain.c` from `config.w32`; handles `soap`, `xmlreader`, `xmlwriter`, `simplexml`

---

## Documentation

- [ ] Write v3 user documentation (currently zero v3 docs)
10 changes: 9 additions & 1 deletion bin/spc-debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/usr/bin/env bash

# Use SPC_XDEBUG=profile to enable Xdebug profiling mode, which will generate profiling files in /tmp.
# Otherwise, it will enable Xdebug debugging mode, which allows you to connect a debugger to port 9003.
if [ "$SPC_XDEBUG" = "profile" ]; then
XDEBUG_PREFIX="-d xdebug.mode=profile -d xdebug.start_with_request=yes -d xdebug.output_dir=/tmp -d xdebug.output_name=spc-profile.%t.%p.%r"
else
XDEBUG_PREFIX="-d xdebug.mode=debug -d xdebug.client_host=127.0.0.1 -d xdebug.client_port=9003 -d xdebug.start_with_request=yes"
fi

# 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" "$@"
php $XDEBUG_PREFIX "$(dirname "$0")/../bin/spc" "$@"
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"scripts": {
"analyse": "phpstan analyse --memory-limit 300M",
"cs-fix": "php-cs-fixer fix",
"lint-config": "bin/spc dev:lint-config",
"lint-config": "php bin/spc dev:lint-config",
"test": "vendor/bin/phpunit tests/ --no-coverage",
"build:phar": "vendor/bin/box compile"
},
Expand All @@ -63,6 +63,9 @@
"optimize-autoloader": true,
"sort-packages": true
},
"suggest": {
"ext-yaml": "Speeds up YAML config file parsing"
},
"funding": [
{
"type": "other",
Expand Down
Loading