Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
478 commits
Select commit Hold shift + click to select a range
a072657
Update license file path for bzip2 in configuration
crazywhalecc Feb 5, 2026
807b90b
Fix incorrect variable name for working directory in submodule update…
crazywhalecc Feb 5, 2026
7ae16e5
Add imagemagick,jbig,lerc,libaom,libde265,libheif,libjxl,libtiff,libw…
crazywhalecc Feb 5, 2026
8f798c9
Add imap and BuildRootTracker
crazywhalecc Feb 6, 2026
1eec88f
Add reset command
crazywhalecc Feb 6, 2026
3cfab10
Add libacl
crazywhalecc Feb 6, 2026
39a2070
Add libargon2
crazywhalecc Feb 6, 2026
fba2676
Add lint-config command to check and sort configuration files
crazywhalecc Feb 6, 2026
d999bfc
Add libavif
crazywhalecc Feb 6, 2026
880bb87
Add libevent and postinstall action adder for library package
crazywhalecc Feb 6, 2026
a832cc2
Add libffi
crazywhalecc Feb 6, 2026
2723387
Add liblz4
crazywhalecc Feb 6, 2026
e9a411c
Add libmaxminddb
crazywhalecc Feb 6, 2026
bd11533
Add libmemcached
crazywhalecc Feb 6, 2026
f2d389d
Add librabbitmq
crazywhalecc Feb 6, 2026
4cfd8f4
Add librdkafka
crazywhalecc Feb 6, 2026
127697b
Add liburing
crazywhalecc Feb 6, 2026
fa1b71b
Add libuuid
crazywhalecc Feb 6, 2026
d6af728
Add libuv
crazywhalecc Feb 6, 2026
0c386e9
Allow shell completion for build:libs command
crazywhalecc Feb 6, 2026
017fabd
Add libxslt
crazywhalecc Feb 6, 2026
b42601d
Add libyaml
crazywhalecc Feb 6, 2026
2874336
Add mimalloc
crazywhalecc Feb 6, 2026
9912b21
Add net-snmp
crazywhalecc Feb 6, 2026
aad710e
Add postgresql
crazywhalecc Feb 6, 2026
67bea25
Add qdbm
crazywhalecc Feb 6, 2026
425010f
Add re2c
crazywhalecc Feb 6, 2026
6be4da2
Add readline
crazywhalecc Feb 6, 2026
fd40b92
Add snappy
crazywhalecc Feb 6, 2026
d163c3d
Add sqlite
crazywhalecc Feb 6, 2026
a5f8402
Add tidy
crazywhalecc Feb 6, 2026
b6d8bf5
Add unixodbc
crazywhalecc Feb 6, 2026
ca9dc25
Add watcher
crazywhalecc Feb 6, 2026
368461d
phpstan fix
crazywhalecc Feb 6, 2026
c72a2b6
Refactor nasm,php-sdk-binary-tools,strawberry-perl,vswhere
crazywhalecc Feb 6, 2026
d8d9f38
Refactor patching logic for Alpine Linux and macOS in attr.php
crazywhalecc Feb 6, 2026
95f34fb
Add extension amqp
crazywhalecc Feb 6, 2026
cf5a946
Add extension bcmath,openssl,zlib
crazywhalecc Feb 6, 2026
478b858
Chore
crazywhalecc Feb 6, 2026
5c7ab48
Support define php extension arg-type in config
crazywhalecc Feb 6, 2026
7c3ac48
v3-refactor: Implement v2 libs (#1021)
crazywhalecc Feb 6, 2026
041b08f
V3 fix/phpunit (#1024)
crazywhalecc Feb 6, 2026
82bf317
Refactor Linux and macOS tool checks for improved error handling and …
crazywhalecc Feb 6, 2026
6b67cb9
fix: Postgres build with ancient libc
dunglas Feb 11, 2026
1e47803
Update test-extensions.php for PHP versions and extensions
crazywhalecc Feb 11, 2026
0fe1442
Bump version from 2.8.0 to 2.8.2
crazywhalecc Feb 11, 2026
f680731
fix: Postgres build with ancient libc (#1029)
henderkes Feb 11, 2026
9a53ef3
add input with-suggested-libs for build command
yoramdelangen Feb 13, 2026
d9834d0
upload debug logs on 'build php' failures
yoramdelangen Feb 16, 2026
661723c
change logs name
yoramdelangen Feb 16, 2026
794ab16
add input with-suggested-libs for build command (#1032)
henderkes Feb 16, 2026
c680299
libavif needs at least one encoder to work
henderkes Feb 17, 2026
608c915
should depend on it instead
henderkes Feb 17, 2026
b01d3ce
Merge branch 'main' into feat/avif-dec
henderkes Feb 17, 2026
98117c3
remove pre built
henderkes Feb 17, 2026
38140d1
libavif needs at least one encoder to work (#1033)
henderkes Feb 17, 2026
5623fed
fix redownloading go-xcaddy every time
henderkes Feb 17, 2026
d83a597
unquote the string in case a shell script passes it stupidly
henderkes Feb 17, 2026
67ef8f6
fix redownloading go-xcaddy every time, version 2.8.3 (#1034)
henderkes Feb 17, 2026
18434b6
Add frankenphp SAPI build support
crazywhalecc Feb 10, 2026
508f635
Add permission copying to ArtifactExtractor
crazywhalecc Feb 11, 2026
7a3f10b
Make downloader configurable
crazywhalecc Feb 11, 2026
0be4e85
Avoid using glob in phar mode
crazywhalecc Feb 14, 2026
753fdd7
Add registry availability check
crazywhalecc Feb 15, 2026
1095807
Use yml instead
crazywhalecc Feb 15, 2026
f1e9dd8
Fix box compile config for v3
crazywhalecc Feb 15, 2026
2fdb0b4
Correct bootstrap
crazywhalecc Feb 15, 2026
059f785
Remove redundant catch for downloader
crazywhalecc Feb 15, 2026
ee5aabb
Add CMakeConfigureLog.yaml lookup
crazywhalecc Feb 15, 2026
bbab685
Refactor exception handler to v3, use standard shell exitcode
crazywhalecc Feb 15, 2026
bc7ac81
phpstan, package display message enhance
crazywhalecc Feb 17, 2026
471df00
Use StaticPHP instead of static-php-cli
crazywhalecc Feb 19, 2026
d495455
Remove motd for lint-config command
crazywhalecc Feb 23, 2026
2a8fa7d
Update build flags for FrankenPHP in UnixBuilderBase
dunglas Feb 23, 2026
7d7902e
Update build flags for FrankenPHP in UnixBuilderBase (#1042)
henderkes Feb 23, 2026
a357510
Add frankenphp building message for console output
crazywhalecc Feb 26, 2026
28bbdf5
Merge branch 'main' into v3-refactor/extensions
crazywhalecc Feb 26, 2026
08595cc
Add PatchDescription attribute to libacl for Unix FPM_EXTRA_LIBS fix
crazywhalecc Feb 26, 2026
0f012f2
Rename tracker file from .spc-tracker.json to .build.json
crazywhalecc Feb 26, 2026
a57b48f
Add macOS check to patchBeforePHPConfigure for explicit_bzero detection
crazywhalecc Feb 26, 2026
3238c44
Refactor FrankenPHP build and smoke test processes for Unix
crazywhalecc Feb 26, 2026
bb257cf
Add extension apcu
crazywhalecc Feb 26, 2026
e927994
Add DumpStagesCommand to dump package stages and their locations
crazywhalecc Feb 26, 2026
da1f348
Update src/StaticPHP/Package/PhpExtensionPackage.php
crazywhalecc Feb 27, 2026
0e80f29
Add DumpCapabilitiesCommand to output installable and buildable capab…
crazywhalecc Feb 27, 2026
d6ec0b7
Remove aarch64 build fix for glibc 2.17 from patchBeforeBuild method …
crazywhalecc Feb 27, 2026
cfce177
Add beforeMakeUnix method to patch TSRM.h for musl TLS symbol visibility
crazywhalecc Feb 27, 2026
28c82b8
Add PackageInfoCommand to display package configuration information a…
crazywhalecc Feb 27, 2026
f9fe2ad
Trim quotes from frankenphp app path to ensure valid directory check
crazywhalecc Feb 27, 2026
b3d67b9
Add tryPatchMakefileUnix method to fix //lib path in Makefile for Lin…
crazywhalecc Feb 27, 2026
8c7d113
Apply smoke test control option for frankenphp
crazywhalecc Feb 27, 2026
fa17596
Enable suggested libs by default in build configurations for Unix and…
crazywhalecc Feb 27, 2026
7623b9e
Deprecate '--debug' option and update logging level handling
crazywhalecc Feb 28, 2026
c218aef
Add doctor cache check and version management to ensure environment v…
crazywhalecc Feb 28, 2026
d316684
Add optional package support for libaom, libsharpyuv, libjpeg, libxml…
crazywhalecc Feb 28, 2026
2d550a8
Add simple output handling to exception classes
crazywhalecc Feb 28, 2026
ed5a516
Implement check-update functionality for artifacts and enhance downlo…
crazywhalecc Feb 28, 2026
40e3698
Add custom binary check-update support for artifacts
crazywhalecc Feb 28, 2026
550f6ca
Replace RuntimeException with DownloaderException for Go version retr…
crazywhalecc Feb 28, 2026
0a07f6b
cs fix
crazywhalecc Feb 28, 2026
a7b04d9
Update src/StaticPHP/Artifact/Downloader/Type/Git.php
crazywhalecc Feb 28, 2026
64b0e72
Update src/StaticPHP/Artifact/Downloader/Type/PIE.php
crazywhalecc Feb 28, 2026
6ef5e9e
Update src/StaticPHP/Artifact/Downloader/Type/CheckUpdateInterface.php
crazywhalecc Feb 28, 2026
28f4a5c
Add support for custom source check-update callbacks in artifacts
crazywhalecc Feb 28, 2026
7cedd45
Merge remote-tracking branch 'origin/v3-feat/check-update' into v3-fe…
crazywhalecc Feb 28, 2026
029f8ef
Avoid empty output
crazywhalecc Feb 28, 2026
4f2ca17
cs fix
crazywhalecc Feb 28, 2026
174ef3d
Refactor ReturnCode constants for clarity and consistency
crazywhalecc Feb 28, 2026
dc0a809
Add PECL download type and support for PECL artifacts
crazywhalecc Feb 28, 2026
12d4009
Update PHP release handling to use configurable mirror and improve UR…
crazywhalecc Mar 4, 2026
671ebd2
Use gmp mirror site
crazywhalecc Mar 4, 2026
00c08e0
Use no optional libs for libxml2
crazywhalecc Mar 5, 2026
f7277cc
Improve output formatting for update checks in CheckUpdateCommand
crazywhalecc Mar 5, 2026
715f33a
Add log filtering to prevent sensitive data leakage
crazywhalecc Mar 5, 2026
94fb7a6
Merge remote-tracking branch 'origin/v3-feat/check-update' into v3-fe…
crazywhalecc Mar 5, 2026
5298ee4
Use constant back due to config validation problem
crazywhalecc Mar 5, 2026
abdaaab
Refactor CheckUpdateResult logic to simplify version comparison
crazywhalecc Mar 5, 2026
84f6dab
Add parallel update checking and improve artifact update handling
crazywhalecc Mar 5, 2026
055bc7b
Add condition for ffi patch
crazywhalecc Mar 6, 2026
8a51d64
Add condition for ffi patch (#1050)
henderkes Mar 6, 2026
8c4e3d5
Add php-src mirror and use gmp mirror site (#1048)
crazywhalecc Mar 6, 2026
32b7fee
Fix version extraction to fallback on repository name if tag name is …
crazywhalecc Mar 6, 2026
368ce75
Fix configuration retrieval by using the extension's name instead of …
crazywhalecc Mar 6, 2026
d0b6a02
Add patchBeforeBuild method to modify Makefile CFLAGS and enhance bui…
crazywhalecc Mar 6, 2026
5e84fed
Add ext-brotli
crazywhalecc Mar 6, 2026
58c02df
Add ext-bz2
crazywhalecc Mar 6, 2026
fc807ec
Add ext-calendar
crazywhalecc Mar 6, 2026
fbbed6d
Add ext-ctype
crazywhalecc Mar 6, 2026
780232f
Enhance dependency resolution for virtual-target packages
crazywhalecc Mar 6, 2026
07fd1bc
Patch extension config.m4 files to use PKG_CHECK_MODULES_STATIC
crazywhalecc Mar 6, 2026
0548aba
Add ext-curl
crazywhalecc Mar 7, 2026
5669642
Merge branch 'main' into v3-refactor/new-extensions
crazywhalecc Mar 7, 2026
b0b3220
Fix zlib configure arg
crazywhalecc Mar 8, 2026
88af4a7
Prefer cache extract path in getSourceDir method
crazywhalecc Mar 8, 2026
19d6d66
Move arg-type def in config
crazywhalecc Mar 8, 2026
2676875
Refactor PKG_CHECK_MODULES replacement and reuse make vars for configure
crazywhalecc Mar 8, 2026
0c86d82
Update getDistName method to use display-name from config
crazywhalecc Mar 8, 2026
8f10e0d
Add before and after build hooks for phar extension to replace file s…
crazywhalecc Mar 8, 2026
ad01187
Update arg-type definition in builtin-extensions.yml to include speci…
crazywhalecc Mar 8, 2026
a9e6e4a
Add dba
crazywhalecc Mar 8, 2026
6d2c43d
Add license metadata for ast extension
crazywhalecc Mar 8, 2026
247a254
Add ext-dio
crazywhalecc Mar 8, 2026
b90356b
Enhancement for bin/spc dev:info command
crazywhalecc Mar 8, 2026
424228d
Add ext-dom, ext-xml
crazywhalecc Mar 8, 2026
1f768ff
Mark transitive PHP extension dependencies of static extensions as st…
crazywhalecc Mar 8, 2026
77e1298
Move all interactive input to construct
crazywhalecc Mar 9, 2026
705435e
[3.0] Add `check-update` command and `CheckUpdateInterface` for artif…
crazywhalecc Mar 9, 2026
dc0b3b8
Merge branch 'v3-refactor/extensions' into v3-refactor/new-extensions
crazywhalecc Mar 9, 2026
b185d27
Add ext-ds
crazywhalecc Mar 9, 2026
8cc5877
Add ext-ev,ext-sockets
crazywhalecc Mar 9, 2026
a678d90
Add ext-event
crazywhalecc Mar 9, 2026
552a8a1
Add ext-excimer (closes #1019)
crazywhalecc Mar 9, 2026
b226887
Add ext-exif
crazywhalecc Mar 9, 2026
cf2e1d9
Add ext-ffi
crazywhalecc Mar 9, 2026
659b75c
Remove redundant dependency for specific virtual target (php-fpm)
crazywhalecc Mar 9, 2026
8fdfcf8
Fix suggested extensions not passing when using `--with-suggests`
crazywhalecc Mar 9, 2026
38715bb
Add ext-fileinfo,ext-filter,ext-ftp
crazywhalecc Mar 9, 2026
61d50cd
Add ext-gd
crazywhalecc Mar 9, 2026
4a572a1
Add ext-gettext
crazywhalecc Mar 9, 2026
7856f7e
Add ext-gmp
crazywhalecc Mar 9, 2026
404195a
Add ext-gmssl
crazywhalecc Mar 9, 2026
b89a29d
Add ext-grpc
crazywhalecc Mar 10, 2026
465549f
Forward-port #1056 on v3
crazywhalecc Mar 10, 2026
e0d2ee9
Add ext-gmp
crazywhalecc Mar 10, 2026
bc26e3d
Add ext-gmssl
crazywhalecc Mar 10, 2026
2d906a8
Add ext-iconv
crazywhalecc Mar 10, 2026
e73bad9
Add ext-igbinary
crazywhalecc Mar 10, 2026
1400dc6
Add ext-session
crazywhalecc Mar 10, 2026
d7eb33f
Forward-port #1057
crazywhalecc Mar 10, 2026
e31aeab
Add ext-imagick
crazywhalecc Mar 10, 2026
f83565b
Add ext-intl
crazywhalecc Mar 10, 2026
d8dda09
Add ext-ldap
crazywhalecc Mar 10, 2026
c5b11f4
Add ext-libxml
crazywhalecc Mar 10, 2026
fa7de06
Add ext-lz4
crazywhalecc Mar 10, 2026
f414bd2
Add ext-maxminddb
crazywhalecc Mar 11, 2026
0719c45
Merge remote-tracking branch 'origin/v3-refactor/new-extensions' into…
crazywhalecc Mar 11, 2026
f6a9dac
Fix grpc build error with RPATH
crazywhalecc Mar 11, 2026
cbfeefc
Add ext-inotify
crazywhalecc Mar 11, 2026
f35f133
Add ext-memcache
crazywhalecc Mar 11, 2026
59a8b65
Add ext-memcache,ext-msgpack
crazywhalecc Mar 11, 2026
32bb0aa
Add ext-mysqli,ext-mysqlnd
crazywhalecc Mar 11, 2026
13ab3e2
Fix transitive extension dependency not enabled bug
crazywhalecc Mar 11, 2026
e523fff
Add ext-mysqlnd_ed25519
crazywhalecc Mar 11, 2026
91ee94f
Add ext-mongodb
crazywhalecc Mar 12, 2026
54f53fd
Add ext-mysqlnd_parsec
crazywhalecc Mar 12, 2026
c7f611f
Add ext-odbc
crazywhalecc Mar 12, 2026
6f372a7
Remove check for php_micro.c file existence in SourcePatcher
crazywhalecc Mar 12, 2026
371a1af
Add ext-opcache
crazywhalecc Mar 12, 2026
5284695
Add ext-opentelemetry
crazywhalecc Mar 12, 2026
32bdacd
Add ext-parallel
crazywhalecc Mar 12, 2026
cbc8fee
Add patch for SPC_MICRO_PATCHES and update configure.ac handling
crazywhalecc Mar 12, 2026
9713b76
Add patch to modify info.c for release builds to hide configure command
crazywhalecc Mar 12, 2026
9d65c49
Add ext-password-argon2
crazywhalecc Mar 12, 2026
e902352
Merge remote-tracking branch 'origin/v3-refactor/new-extensions' into…
crazywhalecc Mar 12, 2026
7a690fd
Add ext-pcov
crazywhalecc Mar 12, 2026
7486502
Add ext-pcntl,ext-pdo,ext-pdo_mysql,ext-pdo_odbc
crazywhalecc Mar 12, 2026
f85f29e
Add ext-pgsql,ext-pdo_pgsql
crazywhalecc Mar 12, 2026
6af5532
Add ext-sqlite3,ext-pdo_sqlite
crazywhalecc Mar 12, 2026
54e301d
Add ext-sqlsrv,ext-pdo_sqlsrv
crazywhalecc Mar 12, 2026
63d28bd
Add ext-posix
crazywhalecc Mar 12, 2026
067749a
Add ext-protobuf
crazywhalecc Mar 12, 2026
a288533
Add ext-rar
crazywhalecc Mar 12, 2026
935fbbd
Add ext-rdkafka
crazywhalecc Mar 13, 2026
6ed6206
Add ext-redis
crazywhalecc Mar 13, 2026
271013f
Add ext-shmop, fix path slashes
crazywhalecc Mar 13, 2026
e30a10f
Add ext-simdjson, add SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS env var
crazywhalecc Mar 16, 2026
fe302bf
Add ext-simplexml
crazywhalecc Mar 16, 2026
15e7678
Add missing xml-related patches for windows
crazywhalecc Mar 16, 2026
1670b61
Add ext-snappy
crazywhalecc Mar 16, 2026
3f812fe
Fix filename generation for GitHub tarballs to handle missing tag names
crazywhalecc Mar 16, 2026
21e2a01
Add ext-snmp
crazywhalecc Mar 16, 2026
ba253ea
Add ext-soap
crazywhalecc Mar 16, 2026
d79128c
Add ext-sodium
crazywhalecc Mar 16, 2026
65c3263
Add ext-spx
crazywhalecc Mar 16, 2026
b89e941
Add ext-ssh2
crazywhalecc Mar 17, 2026
02d40d1
Add ext-sysvmsg,ext-sysvsem,ext-sysvshm
crazywhalecc Mar 17, 2026
170371a
Add ext-tidy
crazywhalecc Mar 17, 2026
bfb6fcd
Add ext-tokenizer
crazywhalecc Mar 17, 2026
deef11c
Add ext-trader
crazywhalecc Mar 17, 2026
25bec6b
Add ext-uuid
crazywhalecc Mar 17, 2026
22c5403
Allow unstable for PECL downloads
crazywhalecc Mar 17, 2026
2327f32
Add ext-uv
crazywhalecc Mar 17, 2026
20b693d
Add ext-xdebug
crazywhalecc Mar 17, 2026
ca15ccd
Add ext-xhprof
crazywhalecc Mar 17, 2026
5d309ee
Add ext-zip
crazywhalecc Mar 17, 2026
154adc1
Add ext-xlswriter
crazywhalecc Mar 17, 2026
63bee0d
Add ext-xmlwriter,ext-xmlreader
crazywhalecc Mar 17, 2026
0101e6c
Add ext-xsl
crazywhalecc Mar 17, 2026
0a60eba
Add ext-xz
crazywhalecc Mar 17, 2026
83c266a
Add ext-yac
crazywhalecc Mar 17, 2026
738c61b
Add ext-zstd
crazywhalecc Mar 17, 2026
98a618f
Add ext-yaml
crazywhalecc Mar 17, 2026
b1a59da
Make PhpExtensionPackage::getSharedExtensionLoadString public
crazywhalecc Mar 18, 2026
b5b917c
Fix zig-cc strlcpy missing issue with swoole+openssl
crazywhalecc Mar 18, 2026
a24fae7
Add ext-swoole
crazywhalecc Mar 18, 2026
1ee8bc7
Add ext-swow
crazywhalecc Mar 18, 2026
c1f2fd4
Add ext-imap
crazywhalecc Mar 18, 2026
c81146b
Add ncursesw
crazywhalecc Mar 18, 2026
0b0ecd1
Allow curl building static executable
crazywhalecc Mar 18, 2026
9e2a5ce
Add target htop
crazywhalecc Mar 18, 2026
beeb0b8
Handle failure in fetching Zig version index
crazywhalecc Mar 20, 2026
b052220
Add support for package environment variables and path injection
crazywhalecc Mar 20, 2026
9d748a6
Add rust target
crazywhalecc Mar 20, 2026
b0eff0b
Add protoc target
crazywhalecc Mar 20, 2026
c6207d8
Fix interactive install-pkg command
crazywhalecc Mar 20, 2026
11376cc
Use env and path injection instead of old style
crazywhalecc Mar 20, 2026
00649d8
[3.0] Refactor new extensions (#1051)
crazywhalecc Mar 20, 2026
e9be3a4
Add homebrew llvm version toolchain support
crazywhalecc Mar 20, 2026
dc79ac9
Correct doctor fix
crazywhalecc Mar 20, 2026
64d692e
[3.0] Refactor extensions (#1038)
crazywhalecc Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .github/workflows/build-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ on:
description: Prefer pre-built binaries (reduce build time)
type: boolean
default: true
with-suggested-libs:
description: Build with suggested libs
type: boolean
default: true
debug:
description: Show full build logs
type: boolean
Expand Down Expand Up @@ -86,6 +90,10 @@ on:
description: Prefer pre-built binaries (reduce build time)
type: boolean
default: true
with-suggested-libs:
description: Include suggested libs
type: boolean
default: false
debug:
description: Show full build logs
type: boolean
Expand Down Expand Up @@ -157,6 +165,9 @@ jobs:
if [ ${{ inputs.prefer-pre-built }} == true ]; then
DOWN_CMD="$DOWN_CMD --prefer-pre-built"
fi
if [ ${{ inputs.with-suggested-libs }} == true ]; then
BUILD_CMD="$BUILD_CMD --with-suggested-libs"
fi
if [ ${{ inputs.build-cli }} == true ]; then
BUILD_CMD="$BUILD_CMD --build-cli"
fi
Expand Down Expand Up @@ -202,6 +213,14 @@ jobs:
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3

# Upload debug logs
- if: ${{ inputs.debug && failure() }}
name: "Upload build logs on failure"
uses: actions/upload-artifact@v4
with:
name: spc-logs-${{ inputs.php-version }}-${{ inputs.os }}
path: log/*.log

# Upload cli executable
- if: ${{ inputs.build-cli == true }}
name: "Upload PHP cli SAPI"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-windows-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ on:
description: prefer pre-built binaries (reduce build time)
type: boolean
default: true
with-suggested-libs:
description: Build with suggested libs
type: boolean
default: true
debug:
description: enable debug logs
type: boolean
Expand Down
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
14 changes: 10 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 Expand Up @@ -33,6 +33,9 @@ packlib_files.txt
.php-cs-fixer.cache
.phpunit.result.cache

# doctor cache fallback (when ~/.cache/spc/ is not writable)
.spc-doctor.lock

# exclude self-runtime
/bin/*
!/bin/spc*
Expand Down Expand Up @@ -61,3 +64,6 @@ log/
# spc.phar
spc.phar
spc.exe

# dumped files from StaticPHP v3
/dump-*.json
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());
3 changes: 0 additions & 3 deletions README-en.md

This file was deleted.

8 changes: 4 additions & 4 deletions README-zh.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# static-php-cli
# StaticPHP

[![English readme](https://img.shields.io/badge/README-English%20%F0%9F%87%AC%F0%9F%87%A7-moccasin?style=flat-square)](README.md)
[![Chinese readme](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87%20%F0%9F%87%A8%F0%9F%87%B3-moccasin?style=flat-square)](README-zh.md)
[![Releases](https://img.shields.io/packagist/v/crazywhalecc/static-php-cli?include_prereleases&label=Release&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/releases)
[![CI](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/tests.yml?branch=main&label=Build%20Test&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://github.com/crazywhalecc/static-php-cli/blob/main/LICENSE)

**static-php-cli** 是一个用于构建静态、独立 PHP 运行时的强大工具,支持众多流行扩展
**StaticPHP** 是一个用于构建静态编译可执行文件(包括 PHP、扩展等)的强大工具

## 特性

Expand Down Expand Up @@ -80,7 +80,7 @@ download-options:

### 3. 静态 PHP 使用

现在您可以将 static-php-cli 构建的二进制文件复制到另一台机器上,无需依赖即可运行:
现在您可以将 StaticPHP 构建的二进制文件复制到另一台机器上,无需依赖即可运行:

```
# php-cli
Expand All @@ -97,7 +97,7 @@ buildroot/bin/php-fpm -v

## 文档

当前 README 包含基本用法。有关 static-php-cli 的所有功能,
当前 README 包含基本用法。有关 StaticPHP 的所有功能,
请访问 <https://static-php.dev>。

## 直接下载
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# static-php-cli
# StaticPHP

[![Chinese readme](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87%20%F0%9F%87%A8%F0%9F%87%B3-moccasin?style=flat-square)](README-zh.md)
[![English readme](https://img.shields.io/badge/README-English%20%F0%9F%87%AC%F0%9F%87%A7-moccasin?style=flat-square)](README.md)
[![Releases](https://img.shields.io/packagist/v/crazywhalecc/static-php-cli?include_prereleases&label=Release&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/releases)
[![CI](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/tests.yml?branch=main&label=Build%20Test&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://github.com/crazywhalecc/static-php-cli/blob/main/LICENSE)

**static-php-cli** is a powerful tool designed for building static, standalone PHP runtime
with popular extensions.
**StaticPHP** is a powerful tool designed for building portable executables including PHP, extensions, and more.

## Features

Expand Down Expand Up @@ -81,7 +80,7 @@ Run command:

### 3. Static PHP usage

Now you can copy binaries built by static-php-cli to another machine and run with no dependencies:
Now you can copy binaries built by StaticPHP to another machine and run with no dependencies:

```
# php-cli
Expand All @@ -98,7 +97,7 @@ buildroot/bin/php-fpm -v

## Documentation

The current README contains basic usage. For all the features of static-php-cli,
The current README contains basic usage. For all the features of StaticPHP,
see <https://static-php.dev> .

## Direct Download
Expand Down
23 changes: 8 additions & 15 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,16 @@ 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);
exit(1);
} catch (SPCException $e) {
exit(ExceptionHandler::handleSPCException($e));
} catch (\Throwable $e) {
exit(ExceptionHandler::handleDefaultException($e));
}

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
38 changes: 21 additions & 17 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{
"alias": "spc-php.phar",
"banner": false,
"blacklist": [
".github"
],
"compression": "GZ",
"directories": [
"config",
"src",
"vendor/psr",
"vendor/laravel/prompts",
"vendor/illuminate",
"vendor/symfony",
"vendor/zhamao"
],
"git-commit-short": "git_commit_short",
"output": "spc.phar"
"alias": "spc-php.phar",
"banner": false,
"blacklist": [
".github"
],
"compression": "GZ",
"check-requirements": false,
"directories": [
"config",
"src",
"vendor/psr",
"vendor/laravel/prompts",
"vendor/symfony",
"vendor/php-di",
"vendor/zhamao"
],
"files": [
"spc.registry.yml"
],
"git-commit-short": "git_commit_short",
"output": "spc.phar"
}
13 changes: 11 additions & 2 deletions captainhook.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,30 @@
"enabled": true,
"actions": [
{
"action": "composer analyse"
"action": "php vendor/bin/phpstan analyse --memory-limit 300M"
}
]
},
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "composer cs-fix -- --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php}",
"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"]
}
]
},
{
"action": "bin/spc dev:lint-config --check",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\InDirectory",
"args": ["config"]
}
]
}
]
},
Expand Down
16 changes: 10 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,29 @@
}
],
"require": {
"php": ">= 8.3",
"php": ">=8.4",
"ext-mbstring": "*",
"ext-zlib": "*",
"laravel/prompts": "^0.1.12",
"laravel/prompts": "~0.1",
"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",
"captainhook/hook-installer": "^1.0",
"friendsofphp/php-cs-fixer": "^3.60",
"humbug/box": "^4.5.0 || ^4.6.0",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^10.3 || ^9.5"
},
"autoload": {
"psr-4": {
"SPC\\": "src/SPC"
"SPC\\": "src/SPC",
"StaticPHP\\": "src/StaticPHP",
"Package\\": "src/Package"
},
"files": [
"src/globals/defines.php",
Expand All @@ -37,7 +40,7 @@
},
"autoload-dev": {
"psr-4": {
"SPC\\Tests\\": "tests/SPC"
"Tests\\StaticPHP\\": "tests/StaticPHP"
}
},
"bin": [
Expand All @@ -46,6 +49,7 @@
"scripts": {
"analyse": "phpstan analyse --memory-limit 300M",
"cs-fix": "php-cs-fixer fix",
"lint-config": "bin/spc dev:lint-config",
"test": "vendor/bin/phpunit tests/ --no-coverage",
"build:phar": "vendor/bin/box compile"
},
Expand Down
Loading
Loading