Conversation
@henderkes There's no urgent things. Just when you return from your vacation, and if you have time, it would be best we could discuss what modifications are still needed for the current framework of v3. Please feel free to contact me if you'd like. Currently I've finished the major part of framework according to RFC, but I haven't ported most of the implementation yet, mainly to prevent major changes to the framework structure from requiring massive modifications. And for anyone: If you have any feedback on the framework design, please let me know. |
|
I haven't had much of a look yet and the changelist is quite massive, so it might be a good idea to chat about it one evening after I had a rough glance. I'll give everything (especially vendor mode) a play and rewrite the static-php/packages properly on top of the new branch. Might have to add versioned packages to it first though, because that's the part still holding up apk and proper apt support. |
|
For a quick reference for command mode, in the current branch, the available commands:
The remaining commands and some of the option implementations may not have been tested. |
You mean the dependencies' version from artifacts? |
No, I mean versioned .deb packages like php-zts8.3-... Nothing on the spc side.
Why is --build-cli deprecated? What would be the new way to build multiple SAPIs at once? |
I'm thinking of something like I haven't decided any changes yet, but anyway we should current deprecate |
static-php-cli 3.0.0-alpha1 Releasestatic-php-cli v3 is a ground-up rewrite of the project, bringing a modern PHP 8.4+ architecture, dramatically improved user experience, and a flexible plugin system. This release represents months of work reimagining how static PHP binaries should be built. HighlightsConcurrent Parallel DownloadsThe download system now supports fiber-based parallel downloads out of the box. Use Improved Terminal OutputTerminal output has been completely redesigned. Build progress is now color-coded with clear status indicators, structured indentation for build stages, and smart verbosity levels ( Check for UpdatesA new Developer ToolingNew
WindowsFrankenPHP and embed SAPIv2 had no Windows support for FrankenPHP, and embed SAPI on Windows was marked as incomplete. v3 fully implements both: Expanded Extension Supportv3 adds explicit Windows build support for 13+ external/PECL extensions, including ArchitecturePHP 8.4 Attribute-Driven Build Systemv3 replaces the v2 inheritance-based builder hierarchy with a declarative attribute system built on PHP 8.4 attributes: #[Library('openssl')]
class openssl {
#[BuildFor('Linux')]
#[BuildFor('Darwin')]
public function buildUnix(LibraryPackage $lib): void {
UnixAutoconfExecutor::create($lib)->configure()->make();
}
#[BuildFor('Windows')]
public function buildWin(LibraryPackage $lib): void { /* ... */ }
}Platform-specific logic is selected at runtime via Dependency Injectionv3 is built on PHP-DI with full autowiring support. Build services, configuration, and runtime utilities are injected automatically into commands, build classes, and stage methods via Unified Package Modelv2 maintained three separate configuration tracks: v3 unifies everything into a single per-package YAML configuration with a flat # config/pkg/lib/curl.yml
curl:
type: library
artifact:
source:
type: ghrel
repo: curl/curl
match: curl-.+\.tar\.gz
binary: hosted
depends:
- openssl
- zlib
depends@windows:
- openssl
- zlibPlatform-specific overrides use Flattened Dependency Graphv2 required maintaining two parallel dependency trees ( Registry and Plugin Systemv3 introduces a registry-based architecture defined in System-Independent Corev2 used a platform-specific builder inheritance hierarchy ( Direct CMake Executionv2 required wrapper BAT scripts ( WindowsCMakeExecutor::new($lib)
->configure('-DBUILD_SHARED_LIBS=OFF')
->make();ConfigurationPer-Package YAMLEach package now has its own YAML configuration file under PECL Source Typev3 adds native PECL download support. External extensions hosted on PECL can be declared simply as: ext-redis:
type: php-extension
artifact:
source:
type: pecl
name: redisThis eliminates the boilerplate download URL configuration required in v2. Environment VariablesBuild environment is now managed through License MetadataPackage configurations now include structured license metadata ( Package Ecosystemv3 ships with 75 system libraries and 112 PHP extension configurations (56 built-in + 56 external/PECL), covering the same breadth as v2 with improved configuration quality. Breaking Changesv3 is a complete rewrite. All internal APIs, configuration formats, and extension points have changed. If you are using static-php-cli as a library ( Key migration points:
|
|
@claude[agent] Review |
|
Lol I can't select it here, only in issues. |
|
@claude[agent] hello review? I'll take a while to meaningfully review this. It will be a lot of work to get through it all and switch our packages to it. |

Important notes
STATUS: dev ->
alpha-> beta -> rc -> stableContribution notes:
alphaversion, any changes should be merged intov3-dev, notv3.alphaversion, any changes should be merged intov3and we will deprecatev3-devbranch.betaversion.RFCs
Progress of refactoring
bin/refactoringbin/spcfor v3bin/spc-alpine-dockerbin/spc-gnu-dockerbin/docker-entrypoint.shbin/setup-runtimev3 new modules
bootstrapfile for initialization (StaticPHP v3 #980) (src/bootstrap.php)init-registrycommand for vendor userCommands refactoring
ConsoleApplication dynamic generating commands for
targettype packages (StaticPHP v3 #980)Custom commands in external registry (StaticPHP v3 #980)
DownloadCommand
--from-zip,--all,--with-openssl11have been removed (StaticPHP v3 #980)--without-suggests,--for-packages,--ignore-cache,--parallel,--no-shallow-clone(StaticPHP v3 #980)--with-php,--clean,--custom-url,--custom-git,--no-alt,--with-php(StaticPHP v3 #980)--for-extensions,--for-libs,--without-suggestions,--ignore-cache-sources,--prefer-pre-built(StaticPHP v3 #980)BaseCommand
BuildLibsCommand
--alloption forbuild:libs(StaticPHP v3 #980)BuildPHPCommand -> BuildTargetCommand with
phppackage--with-libs: Keep for compatibility, add--with-packagesoption (StaticPHP v3 #980)--build-shared--build-all: Special parsing in v3 (StaticPHP v3 #980)--no-strip,--disable-opcache-jit,--build-{sapi},--with-config-file-path,--with-config-file-scan-dir,--with-hardcoded-ini,--with-micro-fake-cli,--with-added-patch (-P),--without-micro-ext-test,--with-upx-pack,--with-micro-logo,--enable-micro-win32,--with-frankenphp-apphas been moved tophppackage definition (StaticPHP v3 #980)no-stripdisable-opcache-jitwith-config-file-pathwith-config-file-scan-dirwith-hardcoded-iniwith-micro-fake-cliwith-addeed-patchwithout-micro-ext-testwith-upx-packwith-micro-logoenable-micro-win32with-frankenphp-appbuild-sharedwith-packages(with-libs)build-allbuild-{sapi}exceptbuild-frankenphp(StaticPHP v3 #980)build-frankenphpwith-suggests(with-suggested-libs,with-suggested-exts)no-download(StaticPHP v3 #980)with-clean#[StaticPHP\Attribute\Package\Info](StaticPHP v3 #980)phppackagebuildstage before (StaticPHP v3 #980)CraftCommand
DeleteDownloadCommand
DoctorCommand (StaticPHP v3 #980) (Just command, not Doctor items)
DumpExtensionsCommand
DumpLicenseCommand
ExtractCommand (Just command, not Extractor)
for-extensions(StaticPHP v3 #980)for-libs(StaticPHP v3 #980)for-packages(StaticPHP v3 #980)without-suggestsforfor-*options (StaticPHP v3 #980)InstallPkgCommand ->InstallPackageCommand
skip-extractMicroCombineCommand
SPCConfigCommand
SwitchPhpVersionCommand
Dev commands
Doctor module
Legacy modules (v2 only - SPC namespace)
These modules exist in v2 but are refactored/merged into new v3 modules: