Skip to content

feat(v3): Tool package refactor#1200

Merged
crazywhalecc merged 10 commits into
v3from
fix/tool-package-system
Jul 6, 2026
Merged

feat(v3): Tool package refactor#1200
crazywhalecc merged 10 commits into
v3from
fix/tool-package-system

Conversation

@crazywhalecc

Copy link
Copy Markdown
Owner

What does this PR do?

  • restructure tool target configs into tool package system
  • add ToolPackage support to executors and builders
  • add --installed flag to check-update command, improve CLI and InteractiveTerm

Checklist before merging

  • If you modified *.php or *.yml, run them locally to ensure your changes are valid:
    • composer cs-fix
    • composer analyse
    • composer test
    • bin/spc dev:lint-config

- Move tool configs from config/pkg/target/ to config/pkg/tool/
- Add ToolVersionRegistry for tracking installed tool versions
- Delete old Target/pkgconfig.php, move to tool config
- Rename: 7za-win, go-win, go-xcaddy, jom, nasm, protoc, strawberry-perl, upx, vswhere, zig, pkg-config
…to executors and builders

- Move getLibExtraCFlags/getLibExtraCxxFlags/getLibExtraLdFlags/getLibExtraLibs from LibraryPackage to Package base class so ToolPackage can also use them
- Full ToolPackage implementation: getBuildRootPath, getIncludeDir, getLibDir, getBinDir, getToolField with platform suffix support
- Update PackageBuilder to support building ToolPackage (not just LibraryPackage)
- Update PackageInstaller: support ToolPackage in download/extract/install pipeline, auto-install build-time tools, record installed versions
- Allow LibraryPackage|ToolPackage union type in all Executor classes and UnixShell::initializeEnv
- Add 'tools' field to ConfigValidator for build-time tool declarations
- Move jom and strawberry-perl from depends@windows to tools@windows in openssl.yml
- Move go-xcaddy/go-win from depends to tools in frankenphp.yml
- Register config/pkg/tool/ path in spc.registry.yml
- Use addInstallPackage for upx tool in php.php (ToolPackage instead of library dep)
- Include 'tool' type in DumpCapabilitiesCommand and InstallPackageCommand package lists
…veTerm

- Add --installed option to check-update command to compare against on-disk version (tool packages)
- Support use_installed parameter in ArtifactDownloader::checkUpdate/checkUpdates
- Add -y shorthand for --auto-fix in doctor command
- Hook InteractiveTerm::init() in ConsoleApplication::doRun() to properly inject Symfony input/output
- Update static-php-cli-hosted → static-php/hosted in both README.md and README-zh.md
@crazywhalecc crazywhalecc added the need-test This PR has not been tested yet, cannot merge now label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

StaticPHP Test Bot

Detected: Extensions: xlswriter | Libraries: openssl | Targets: frankenphp, php, pkg-config, zig
Active labels: none
Available labels: need-test (gate), test/linux test/windows test/macos (platform), test/tier2 (extra arch), test/php-83 test/php-84 (PHP version)
Config: Linux x86_64 + Windows x86_64 + macOS arm64 | PHP 8.5 NTS

@crazywhalecc crazywhalecc requested a review from henderkes July 6, 2026 12:33
@crazywhalecc crazywhalecc merged commit 392733b into v3 Jul 6, 2026
11 checks passed
@crazywhalecc crazywhalecc deleted the fix/tool-package-system branch July 6, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need-test This PR has not been tested yet, cannot merge now

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants