Skip to content

Conversation

@pjcdawkins
Copy link
Contributor

@pjcdawkins pjcdawkins commented Oct 24, 2025

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

  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
@pjcdawkins pjcdawkins marked this pull request as ready for review November 11, 2025 17:55
@pjcdawkins pjcdawkins requested a review from Copilot November 11, 2025 17:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the static-php-cli submodule from v1.3.3 to v2.7.5 and migrates the build process to use the new unified CLI tooling instead of the legacy Docker-based scripts.

Key Changes:

  • Upgraded static-php-cli submodule to v2.7.5 (commit c5ae719b)
  • Migrated from custom Docker build process to spc-alpine-docker tool
  • Replaced extensions.txt with craft.yml for configuration

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ext/static-php-cli Submodule updated to v2.7.5 (c5ae719b)
ext/extensions.txt Removed legacy extension configuration file
ext/craft.yml New configuration file for static-php-cli v2.7.5 build process
Makefile Updated Linux PHP build target to use spc-alpine-docker tool
Dockerfile.php Removed obsolete custom Docker build configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pjcdawkins and others added 2 commits November 11, 2025 20:51
Use static-php-cli's craft command instead of separate download and
build commands. This eliminates the duplication of the extensions list
and aligns with the configuration-driven approach in craft.yml.

Also remove invalid with-strip-php option from craft.yml (stripping is
the default behavior).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Document craft-options based on static-php-cli documentation: doctor
checks the environment, download fetches php-src and libraries, and
build compiles the static binary.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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