Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
271 commits
Select commit Hold shift + click to select a range
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
1865762
Fix config yaml support
crazywhalecc Jan 22, 2026
ae74875
Fix config yaml support
crazywhalecc Jan 22, 2026
7b725bb
Add LicenseDumper component
crazywhalecc Jan 22, 2026
22fc703
Implement attr, brotli, bzip2 build for unix
crazywhalecc Jan 22, 2026
c27ed8b
Implement fastlz, zlib (unix)
crazywhalecc Jan 22, 2026
223dd10
fix spx shared libadd
henderkes Jan 24, 2026
a709221
Add skip helper function for calling events
crazywhalecc Jan 25, 2026
ccd948e
Add openssl lib support
crazywhalecc Jan 25, 2026
3a575f0
Use yml instead of yaml (sync with craft)
crazywhalecc Jan 25, 2026
51415fb
Use shorter summary json file name
crazywhalecc Jan 25, 2026
4531c9f
add option to allow linking musl dynamically on alpine
henderkes Jan 26, 2026
c5882c1
fix gettext v1.0 release
henderkes Jan 30, 2026
0cfa203
fix spx shared libadd (#1022)
henderkes Jan 30, 2026
7a262fe
Merge branch 'refs/heads/main' into v3-refactor/libs
crazywhalecc Feb 2, 2026
a414c65
Forward-port #1022 spc target env var
crazywhalecc Feb 2, 2026
f232588
Merge remote-tracking branch 'origin/v3-refactor/libs' into v3-refact…
crazywhalecc Feb 2, 2026
455d42d
Separate package config
crazywhalecc Feb 2, 2026
f4a29c4
Add dev:lint-config to replace sort-config command
crazywhalecc Feb 2, 2026
f437efe
Add dev:lint-config to replace sort-config command
crazywhalecc Feb 2, 2026
5a83412
Remove sort config command
crazywhalecc Feb 2, 2026
23db10d
Add libiconv,libssh2,libxml2,xz
crazywhalecc Feb 2, 2026
1586825
Add builder options for build:libs command
crazywhalecc Feb 2, 2026
82ab141
Add nghttp2, nghttp3, ngtcp2
crazywhalecc Feb 2, 2026
3d10236
Add PatchBeforeBuild attribute
crazywhalecc Feb 2, 2026
6ee8dc7
Add zstd,libcares
crazywhalecc Feb 2, 2026
19e11ca
Add ldap,libcares,libsodium,libunistring, lint all configs
crazywhalecc Feb 2, 2026
a6c79e3
Add dump license files after installing
crazywhalecc Feb 2, 2026
3492992
Add ncurses
crazywhalecc Feb 3, 2026
fddcdb8
Add filelist downloader debug message
crazywhalecc Feb 3, 2026
e732543
Fix wrong debug message show
crazywhalecc Feb 3, 2026
e4d6723
Add gettext
crazywhalecc Feb 3, 2026
2e8f6bb
Add idn2
crazywhalecc Feb 3, 2026
6688819
Add libedit
crazywhalecc Feb 3, 2026
a2409d9
Add getSourceRoot for artifacts
crazywhalecc Feb 3, 2026
09ddd2f
Add methods to retrieve package sub-dependencies and configuration
crazywhalecc Feb 3, 2026
c536fed
Add krb5 and lint configs
crazywhalecc Feb 3, 2026
103b5b3
Upgrade phpstan to v2
crazywhalecc Feb 3, 2026
7041e06
Add curl
crazywhalecc Feb 3, 2026
6fdbf62
Fix selective artifact installation detect
crazywhalecc Feb 3, 2026
38f7421
Use zig toolchain by default, lint files
crazywhalecc Feb 3, 2026
b89ff3c
Add com_dotnet extension (#1023)
crazywhalecc Feb 3, 2026
274098b
Merge remote-tracking branch 'origin/v3-refactor/libs' into v3-refact…
crazywhalecc Feb 3, 2026
0d4cde7
Add download options for build:libs command
crazywhalecc Feb 3, 2026
a02f287
Fix macOS wrong patch file directory
crazywhalecc Feb 3, 2026
b5c14d6
Fix golang download website hash match pattern
crazywhalecc Feb 4, 2026
c40eaee
Fix custom artifact binary download `is-installed` check
crazywhalecc Feb 4, 2026
08d2020
Allow all artifact configs
crazywhalecc Feb 4, 2026
e2011e1
Verbose message
crazywhalecc Feb 4, 2026
0afa1dd
Use new brand name
crazywhalecc Feb 4, 2026
e9c27de
Add go-xcaddy,musl-toolchain,php,upx, and also glfw linux support
crazywhalecc Feb 4, 2026
8f44b07
Merge remote-tracking branch 'origin/v3-refactor/libs' into v3-refact…
crazywhalecc Feb 4, 2026
0652d4a
Just in case source dir have not been created
crazywhalecc Feb 4, 2026
3fa2d69
Add ext-mbstring,ext-mbregex,onig
crazywhalecc Feb 4, 2026
16f9446
Add artifact name suggestions for download and install commands
crazywhalecc Feb 4, 2026
b9af9ba
Chore
crazywhalecc Feb 4, 2026
6bd3646
Merge branch 'main' into v3-refactor/libs
crazywhalecc Feb 5, 2026
4d4b1a3
Add ext-readline,freetype,gmssl,grpc,icu
crazywhalecc Feb 5, 2026
2a4959d
Chore
crazywhalecc Feb 5, 2026
9f2132c
Add pack lib command
crazywhalecc Feb 5, 2026
81ce777
phpstan fix
crazywhalecc Feb 5, 2026
0d32b7b
Refactor lib packing to v3 postinstall action
crazywhalecc Feb 5, 2026
b3bbe0a
Add libjpeg,libpng
crazywhalecc Feb 5, 2026
8fc2da9
Use OS release definition for openssl
crazywhalecc Feb 5, 2026
97634b0
Forward-port #1006 changes
crazywhalecc Feb 5, 2026
a75060e
Update exit code in ArtifactDownloader to reflect termination signal
crazywhalecc Feb 5, 2026
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
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
  •  
  •  
  •  
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());
3 changes: 0 additions & 3 deletions README-en.md

This file was deleted.

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
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
17 changes: 11 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,30 @@
}
],
"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",
"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 +41,7 @@
},
"autoload-dev": {
"psr-4": {
"SPC\\Tests\\": "tests/SPC"
"Tests\\StaticPHP\\": "tests/StaticPHP"
}
},
"bin": [
Expand All @@ -46,6 +50,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