Skip to content

Follow-ups: PHP 8.6 workarounds and other things that will go stale #18

Open

Description

@rfay

Issue by Claude Code, at @rfay's request.

#17 added PHP 8.6 pre-release builds and a PHP version test matrix. Several pieces of it work around missing upstream support, and will go stale or need removing later. Each item below has a suggestion for making it maintain itself, or a note on when to remove it.

1. Pinned APCu commit for PHP 8.6+

web-build/Dockerfile.php-patch-build:51 builds APCu from krakjoe/apcu commit ebbcd3d1 for PHP 8.6 and later. The latest release, 5.1.28, doesn't compile against 8.6 because php_verror() changed; master fixed it in krakjoe/apcu#630.

Suggestion: use the pin only while PECL's latest APCu release is still 5.1.28. Check https://pecl.php.net/rest/r/apcu/latest.txt; once it reports a newer version, use the normal PECL download. Then remove the pin.

2. Pre-release downloads only find the current RC

Dockerfile:37 looks up release candidates in php.net's pre-release list, which lists only the current pre-release of each version. As soon as 8.6.0RC5 or 8.6.0 is out, STATIC_PHP_VERSION=8.6.0RC4 fails with "not found on php.net, or not the current pre-release". The tests aren't affected because they pick the newest version.

Suggestions:

  • Fall back to the GitHub tag archive, https://github.com/php/php-src/archive/refs/tags/php-<version>.tar.gz, for any version php.net doesn't have. Those archives have no generated configure, but static-php-cli runs ./buildconf --force anyway. This is untested.
  • Or say in the error message that RCs must be updated, and point to the pre-release page.

3. README example 8.6.0RC4

README.md:70-74 uses 8.6.0RC4 in the example, which stops working at the next RC.

Suggestion: after 8.6.0 is released, change the example to a placeholder such as 8.7.0RC1, and link to the pre-release page for the current version.

4. static-php-cli workarounds for PHP 8.6

static-php-cli 2.8.5 doesn't support 8.6 yet; upstream is tracking it in crazywhalecc/static-php-cli#1225. Two workarounds are in place:

  • Dockerfile:75 replaces static-php-cli's whole configure command with a copy that uses --enable-pic instead of --with-pic, which PHP 8.6 rejects. That copy won't pick up later changes to static-php-cli's default.
    Suggestion: read SPC_CMD_PREFIX_PHP_CONFIGURE from static-php-cli's config/env.ini and replace only --with-pic, or skip the override once a release no longer passes it.
  • Dockerfile:71 sets SPC_MICRO_PATCHES="". static-php-cli's patch list stops at 8.5, so it applies its PHP 8.0 micro SAPI patches to 8.6, and they fail. We don't build the micro SAPI, so this can stay permanently.

Also worth reporting upstream: when the GitHub lookup for openssl fails, static-php-cli falls back to scraping openssl.org. Its regex no longer matches that page, so the build crashes with a TypeError instead of downloading. Details are in #15.

5. Tests

  • tests/test.bats:72: DDEV v1.25.4 doesn't accept php_version: 8.6, so the 8.6 test falls back to 8.5. Remove the fallback once DDEV stable supports 8.6, which should be v1.25.5.
  • tests/test.bats:111: unreleased_checks runs only for the directory install. After the next release, move it into health_checks so the scheduled release test covers the php.ini loading and the new extensions too.

Ongoing

The build always uses static-php-cli's latest release, so an upstream change can break it at any time; the daily scheduled run is what catches that. The matrix in tests.yml needs a new entry when 8.7 enters pre-release, and old versions should be dropped as static-php-cli stops supporting them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions