Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
531 commits
Select commit Hold shift + click to select a range
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
c5efcc0
Fix wrongly using msys2 tar.exe
crazywhalecc Mar 20, 2026
3c9e868
Add spc-debug script on Windows
crazywhalecc Mar 20, 2026
46132ee
Fix doctor lock path on Windows
crazywhalecc Mar 20, 2026
1d2916f
Add brotli
crazywhalecc Mar 20, 2026
0c389d9
Add zlib
crazywhalecc Mar 20, 2026
464ddeb
Fix file copy operation to handle identical source and destination paths
crazywhalecc Mar 20, 2026
b21d571
Add onig
crazywhalecc Mar 20, 2026
9f3e353
Add bzip2
crazywhalecc Mar 20, 2026
03cd7e1
Add brotli libs
crazywhalecc Mar 20, 2026
d7d41f4
Add openssl
crazywhalecc Mar 20, 2026
94c579a
Add libssh2
crazywhalecc Mar 20, 2026
19bfb6b
Add zstd
crazywhalecc Mar 20, 2026
d1ec473
Allow set current working dir
crazywhalecc Mar 20, 2026
1213cb5
Refactor WindowsUtil to cache Visual Studio search results and add CM…
crazywhalecc Mar 20, 2026
eff7037
Add ngtcp2, remove suggested libs
crazywhalecc Mar 20, 2026
893f640
Add nghttp3
crazywhalecc Mar 20, 2026
9286166
Add nghttp2
crazywhalecc Mar 20, 2026
7df8616
Add libxml2
crazywhalecc Mar 20, 2026
f6e00c6
Refactor LibraryPackage to skip pkg-config and static-bin checks on W…
crazywhalecc Mar 20, 2026
deb9794
Add libiconv-win
crazywhalecc Mar 20, 2026
327bb8b
Add curl
crazywhalecc Mar 20, 2026
bd73b4a
phpstan
crazywhalecc Mar 20, 2026
230be2e
Add libpng
crazywhalecc Mar 21, 2026
5ff973e
Add freetype
crazywhalecc Mar 21, 2026
5207676
Add gmssl
crazywhalecc Mar 21, 2026
bf4d227
Add error handling for missing vswhere.exe in WindowsUtil
crazywhalecc Mar 21, 2026
75dd01a
Enhance package download logic to handle binary-only packages and imp…
crazywhalecc Mar 21, 2026
43d8c9d
Add icu (replace old icu-static-win)
crazywhalecc Mar 21, 2026
801d41e
Add libwebp
crazywhalecc Mar 21, 2026
36177e4
Add libjpeg
crazywhalecc Mar 21, 2026
33f3343
Add libavif
crazywhalecc Mar 21, 2026
a950f3d
Add libaom
crazywhalecc Mar 21, 2026
9af132d
Add missing icu license file
crazywhalecc Mar 21, 2026
adff728
Add libffi-win
crazywhalecc Mar 21, 2026
e443464
Add jom to reduce openssl building time
crazywhalecc Mar 21, 2026
08dca42
Add librabbitmq
crazywhalecc Mar 21, 2026
508cfa6
Make openssl build faster
crazywhalecc Mar 21, 2026
af97263
Forward-port #1070
crazywhalecc Mar 22, 2026
141c737
Add libsodium
crazywhalecc Mar 23, 2026
6d91f8b
Add patch description for Windows static linking in libsodium
crazywhalecc Mar 23, 2026
41f5948
Add libyaml
crazywhalecc Mar 23, 2026
1f42f1a
Add libzip
crazywhalecc Mar 24, 2026
2a50015
Add download options for install-pkg command
crazywhalecc Mar 24, 2026
7c3022b
Add postgresql (replace postgresql-win)
crazywhalecc Mar 24, 2026
bf05af7
Add pthreads4w
crazywhalecc Mar 24, 2026
175567f
Add missing postgresql license
crazywhalecc Mar 24, 2026
6c52451
Add qdbm
crazywhalecc Mar 24, 2026
fcd0052
Add sqlite
crazywhalecc Mar 24, 2026
93c099d
Add xz
crazywhalecc Mar 24, 2026
b625d80
Fix tar command for unix
crazywhalecc Mar 24, 2026
590a94a
Fix cli checks caused php testing fail
crazywhalecc Mar 24, 2026
9cd3125
Patch configure script to include liblber for ldap dependency
crazywhalecc Mar 24, 2026
d2c7fee
[3.0] Refactor windows libs (#1067)
crazywhalecc Mar 24, 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" "$@"
12 changes: 12 additions & 0 deletions bin/spc-debug.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$PHP_Exec = ".\runtime\php.exe"

if (-not(Test-Path $PHP_Exec)) {
$PHP_Exec = Get-Command php.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Definition
if (-not $PHP_Exec) {
Write-Host "Error: PHP not found, you need to install PHP on your system or use 'bin/setup-runtime'." -ForegroundColor Red
exit 1
}
}

& "$PHP_Exec" -d xdebug.mode=debug -d xdebug.client_host=127.0.0.1 -d xdebug.client_port=9003 -d xdebug.start_with_request=yes ("bin/spc") @args
exit $LASTEXITCODE
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
Loading
Loading