Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
e316971
Fix cross-device warning in rename function
crazywhalecc Nov 29, 2025
e6591ff
add pcov extension (shared only, like xdebug)
henderkes Nov 29, 2025
14bfb41
v3 base
crazywhalecc Nov 30, 2025
6b3b841
Fix cross-device warning in rename function (#978)
henderkes Nov 30, 2025
59a6e27
add pcov extension (shared only, like xdebug) (#979)
henderkes Dec 1, 2025
9903c22
Merge branch 'main' into v3-dev
crazywhalecc Dec 2, 2025
c38f174
Forward-port #978
crazywhalecc Dec 2, 2025
daa87e1
Add DirDiff utility and enhance package build process
crazywhalecc Dec 4, 2025
71d803d
cs fix
crazywhalecc Dec 4, 2025
2f8570b
Implement missing legacy options
crazywhalecc Dec 4, 2025
e9d3f7e
Change wrong option name
crazywhalecc Dec 4, 2025
20892ab
Auto-append prefix for php-extension packages
crazywhalecc Dec 4, 2025
dc5bf6d
Correct install-pkg argument name, add alias
crazywhalecc Dec 4, 2025
64fde5f
Allow loading config dir from registry
crazywhalecc Dec 4, 2025
ee46c1c
Fix switch-php-version command not working bug
crazywhalecc Dec 4, 2025
d16f5a9
Add --with-packages option for spc-config command
crazywhalecc Dec 4, 2025
c925914
Add version getter and checksum for go-xcaddy artifact
crazywhalecc Dec 5, 2025
52553fb
Fix PHPStan errors
crazywhalecc Dec 5, 2025
7fa6fd0
Add HostedPackageBin downloader and enhance artifact handling
crazywhalecc Dec 5, 2025
93a697e
Fix artifact downloader constants and improve error message for hoste…
crazywhalecc Dec 5, 2025
106b55d
[v3] Add musl-wrapper and musl-toolchain installation support (#984)
crazywhalecc Dec 5, 2025
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
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
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
File filter

Filter by extension

Filter by extension


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

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

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

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

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

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

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

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

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

3 changes: 2 additions & 1 deletion 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 @@ -123,6 +123,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" "$@"
88 changes: 44 additions & 44 deletions captainhook.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"pre-push": {
"enabled": true,
"actions": [
{
"action": "composer analyse"
}
]
},
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "composer cs-fix -- --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php}",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
}
]
},
"post-change": {
"enabled": true,
"actions": [
{
"action": "composer install",
"options": [],
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
"args": [
[
"composer.json",
"composer.lock"
]
]
}
]
}
]
}
}
{
"pre-push": {
"enabled": true,
"actions": [
{
"action": "php vendor/bin/phpstan analyse --memory-limit 300M"
}
]
},
"pre-commit": {
"enabled": true,
"actions": [
{
"action": "php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php} --sequential",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
}
]
},
"post-change": {
"enabled": true,
"actions": [
{
"action": "composer install",
"options": [],
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
"args": [
[
"composer.json",
"composer.lock"
]
]
}
]
}
]
}
}
14 changes: 9 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
}
],
"require": {
"php": ">= 8.3",
"php": ">=8.4",
"ext-mbstring": "*",
"ext-zlib": "*",
"laravel/prompts": "^0.1.12",
"laravel/prompts": "~0.1",
"nette/php-generator": "^4.2",
"php-di/php-di": "^7.1",
"symfony/console": "^5.4 || ^6 || ^7",
"symfony/process": "^7.2",
"symfony/yaml": "^7.2",
"zhamao/logger": "^1.1.3"
"zhamao/logger": "^1.1.4"
},
"require-dev": {
"captainhook/captainhook-phar": "^5.23",
Expand All @@ -28,7 +30,9 @@
},
"autoload": {
"psr-4": {
"SPC\\": "src/SPC"
"SPC\\": "src/SPC",
"StaticPHP\\": "src/StaticPHP",
"Package\\": "src/Package"
},
"files": [
"src/globals/defines.php",
Expand All @@ -37,7 +41,7 @@
},
"autoload-dev": {
"psr-4": {
"SPC\\Tests\\": "tests/SPC"
"Tests\\StaticPHP\\": "tests/StaticPHP"
}
},
"bin": [
Expand Down
Loading
Loading