Skip to content

Conversation

@pjcdawkins
Copy link
Contributor

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.

Changes Made

  1. Upgraded submodule: Updated ext/static-php-cli from commit 4c55f4a2 to v2.7.5 (c5ae719b)

  2. 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)
  3. Updated Makefile: Replaced the legacy Docker build process with the new spc-alpine-docker tool:

    • Old: Custom Dockerfile.php with manual build scripts
    • New: bin/spc-alpine-docker build command from static-php-cli v2.7.5
  4. 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/spc CLI 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:

  1. Create a Docker image with all dependencies and the static-php-cli toolchain
  2. Build PHP with the specified extensions
  3. 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.

Update the static-php-cli submodule from commit 4c55f4a2 to v2.7.5 (c5ae719b).

Changes made to adapt to v2.7.5:
- Replace legacy Docker build script approach with spc-alpine-docker tool.
- Add ext/craft.yml to configure PHP extensions (curl, filter, openssl, pcntl, phar, posix, zlib).
- Update Makefile to use new build command via spc-alpine-docker.

The new version uses a unified craft.yml configuration format and bin/spc tool
instead of the legacy docker/ directory with manual build scripts.

Co-Authored-By: Claude <[email protected]>
@pjcdawkins pjcdawkins force-pushed the upgrade-static-php-cli branch from 473b2ad to 2674885 Compare October 24, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants