feat: upgrade static-php-cli submodule to v2.7.5
Summary
This PR upgrades the static-php-cli submodule from commit 4c55f4a2 (v1.3.3+132 commits) to v2.7.5 (c5ae719b) and updates the build process to work with the new architecture.
(@crazywhalecc helpfully pointed out our SPC version is rather old)
Changes Made
-
Upgraded submodule: Updated ext/static-php-cli from commit 4c55f4a2 to v2.7.5 (c5ae719b)
-
Created ext/craft.yml: New configuration file for static-php-cli v2.7.5 that specifies:
- PHP version 8.2
- Enabled extensions: curl, filter, openssl, pcntl, phar, posix, zlib
- Build options (UPX packing, stripping)
-
Updated Makefile: Replaced the legacy Docker build process with the new
spc-alpine-dockertool:- Old: Custom Dockerfile.php with manual build scripts
- New:
bin/spc-alpine-docker buildcommand from static-php-cli v2.7.5
-
Removed obsolete files:
- Dockerfile.php (replaced by spc-alpine-docker)
- ext/extensions.txt (replaced by ext/craft.yml)
Key Differences in v2.7.5
- The
docker/directory with manual scripts (download.sh, compile-php.sh, etc.) has been removed - New unified
bin/spcCLI tool with Docker wrappers (spc-alpine-docker, spc-gnu-docker) - Configuration via craft.yml instead of extensions.txt in docker/
- Better dependency management with ext.json, lib.json, and source.json
Testing
To test the build, run:
make php
This will trigger the Linux PHP build using the new spc-alpine-docker tool. The build will:
- Create a Docker image with all dependencies and the static-php-cli toolchain
- Build PHP with the specified extensions
- Copy the resulting binary to internal/legacy/archives/php_linux_
The build may take 10-15 minutes on first run as it sets up the Docker environment.