Skip to content

Conversation

@hussainweb
Copy link
Owner

@hussainweb hussainweb commented Nov 27, 2025

This PR adds PHP 8.5 support to all Docker image variants.

Changes

  • Add PHP 8.5 to GitHub Actions workflow matrix
  • Update build.sh to include PHP 8.5 docker pulls and builds
  • Update clean.sh to remove PHP 8.5 images
  • Update README.md with PHP 8.5 as the latest version
  • Add comprehensive documentation of supported PHP versions and available tags
  • Move `latest` and `latest-alpine` tags from PHP 8.4 to PHP 8.5

All variants (apache-trixie, apache-bookworm, fpm-alpine) now support PHP 8.5.

Testing

The GitHub Actions workflow will build and push images for all PHP versions including 8.5 upon merge.

Summary by CodeRabbit

  • New Features

    • Added support for PHP 8.5 across all variants; PHP 8.5 is now the latest tag.
  • Bug Fixes

    • Opcache is no longer installed by default on PHP 8.5+ builds while retained for older PHP versions.
  • Documentation

    • Updated supported PHP versions, available tags, usage examples, and docker-compose snippets to reflect PHP 8.5.
  • Chores

    • Build and cleanup scripts updated to include PHP 8.5 artifacts.

✏️ Tip: You can customize this high-level summary in your review settings.

- Add PHP 8.5 to GitHub Actions workflow matrix
- Update build.sh to include PHP 8.5 docker pulls and builds
- Update clean.sh to remove PHP 8.5 images
- Update README.md with PHP 8.5 as the latest version
- Add comprehensive documentation of supported PHP versions and available tags
- Move latest and latest-alpine tags from PHP 8.4 to PHP 8.5

All variants (apache-trixie, apache-bookworm, fpm-alpine) now support PHP 8.5
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

Walkthrough

Adds PHP 8.5 support across CI, documentation, build and cleanup scripts, and updates three Dockerfiles to parse PHP version and skip installing the opcache extension for PHP 8.5+.

Changes

Cohort / File(s) Summary
CI/CD Workflow
.github/workflows/docker-buildx.yml
Expanded PHP matrix to include 8.5 across jobs/variants; updated DOCKERFILE_DIR conditional to include 8.5; adjusted latest-tag logic for apache-trixie to use 8.5 instead of 8.4.
Documentation
README.md
Added "Supported PHP Versions" (8.1–8.5) and "Available Tags" entries for 8.5; updated usage examples and docker-compose snippets to use php8.5 / php8.5-alpine.
Build Automation
build.sh
Added pulls and build steps for 8.5 variants (8.5-apache-bookworm, 8.5-fpm-alpine); adjusted tagging (new latest behavior for 8.5 variants) and reworked 8.4/Alpine tag handling.
Cleanup
clean.sh
Added removal commands for PHP 8.5 variants and corresponding Drupal base images (8.5, 8.5-alpine).
Dockerfiles
php8/apache-bookworm/Dockerfile, php8/apache-trixie/Dockerfile, php8/fpm-alpine/Dockerfile
Parse PHP_VERSION to derive PHP_MAJOR_MINOR; set OPCACHE_EXT to empty for 8.5+ and to "opcache" for older versions; replace hardcoded opcache install with $OPCACHE_EXT so opcache is skipped for PHP 8.5+.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Inspect Dockerfile shell parsing for PHP_MAJOR_MINOR (handle inputs like 8.5-fpm-alpine).
  • Verify OPCACHE_EXT branching covers edge cases and doesn’t break extension install lists.
  • Confirm docker-buildx.yml latest-tag conditions and DOCKERFILE_DIR logic include all intended variants.
  • Check build.sh tag ordering to avoid tag collisions and ensure produced tags match README.
  • Ensure clean.sh targets exactly match built image names.

Poem

🐰 I hop through code with whiskers bright,
Eight-point-five arrives at dawn's first light,
Builds and docs and CI in tune,
Opcache skips — a lighter tune,
I nudge a carrot, then I sprint — delight!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective of the PR, which is to add PHP 8.5 support across all Docker build variants.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-php-8.5-support

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec38b01 and ba96351.

📒 Files selected for processing (1)
  • build.sh (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: buildx (8.4, apache-trixie)
  • GitHub Check: buildx (8.2, apache-trixie)
  • GitHub Check: buildx (8.1, apache-bookworm)
  • GitHub Check: buildx (8.1, fpm-alpine)
  • GitHub Check: buildx (8.2, fpm-alpine)
🔇 Additional comments (3)
build.sh (3)

13-13: PHP 8.5 docker pulls are correct.

The additions of php:8.5-apache-bookworm and php:8.5-fpm-alpine pulls follow the existing pattern and are properly placed within their respective sections.

Also applies to: 18-18


26-27: PHP 8.5 Apache build fixes previous critical issue and is now correct.

The previous review flagged a critical mismatch where PHP_VERSION=8.5-apache-bookworm pointed to php8/fpm-alpine/. This has been corrected: line 27 now properly uses ${dir}/php8/apache-bookworm/, aligning the build-arg with the Dockerfile path. The tag reassignment (moving latest from 8.4 to 8.5) is appropriate per the PR objectives.


31-32: PHP 8.5 Alpine build is correct and consistent.

Line 31 removes latest-alpine from the 8.4 build, and line 32 adds PHP 8.5 with both php8.5-alpine and latest-alpine tags. The build-arg (PHP_VERSION=8.5-fpm-alpine) matches the directory path (php8/fpm-alpine/) correctly. Tag reassignment aligns with the PR objectives.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 776084d and 02428d8.

📒 Files selected for processing (4)
  • .github/workflows/docker-buildx.yml (3 hunks)
  • README.md (3 hunks)
  • build.sh (1 hunks)
  • clean.sh (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: buildx (8.5, fpm-alpine)
  • GitHub Check: buildx (8.5, apache-bookworm)
  • GitHub Check: buildx (8.3, apache-bookworm)
  • GitHub Check: buildx (8.5, apache-trixie)
  • GitHub Check: buildx (8.4, apache-trixie)
  • GitHub Check: buildx (8.4, fpm-alpine)
  • GitHub Check: buildx (8.3, fpm-alpine)
  • GitHub Check: buildx (8.1, apache-bookworm)
  • GitHub Check: buildx (8.4, apache-bookworm)
  • GitHub Check: buildx (8.2, apache-bookworm)
  • GitHub Check: buildx (8.2, apache-trixie)
  • GitHub Check: buildx (8.1, apache-trixie)
  • GitHub Check: buildx (8.1, fpm-alpine)
  • GitHub Check: buildx (8.2, fpm-alpine)
🔇 Additional comments (9)
clean.sh (1)

7-7: LGTM!

PHP 8.5 cleanup additions follow the established pattern and align with the new images built in build.sh.

Also applies to: 12-12, 19-19, 24-24

.github/workflows/docker-buildx.yml (3)

19-19: LGTM!

PHP 8.5 added to the version matrix. The workflow will now build all three variants for five PHP versions.


43-43: LGTM!

Conditional correctly includes PHP 8.5 in the DOCKERFILE_DIR check.


62-62: LGTM!

Latest tag logic correctly migrated from PHP 8.4 to 8.5 on the apache-trixie variant, aligning with the PR objective.

build.sh (3)

13-13: LGTM!

PHP 8.5 base image pulls added for both apache-bookworm and fpm-alpine variants.

Also applies to: 18-18


26-26: LGTM!

PHP 8.4 apache-bookworm build correctly configured with matching PHP_VERSION argument and Dockerfile path.


31-31: LGTM!

PHP 8.4 and 8.5 Alpine builds correctly configured. The latest-alpine tag is properly added to the 8.5-alpine build.

Also applies to: 32-32

README.md (2)

14-36: LGTM!

New "Supported PHP Versions" and "Available Tags" sections are well-structured and comprehensive. Documentation clearly lists all five PHP versions (8.1–8.5) and their available tags with architecture support. The distinction between Apache and Alpine variants is clear.


48-48: LGTM!

Usage examples updated consistently to reference PHP 8.5 as the current version for both Apache and FPM-Alpine variants.

Also applies to: 65-65

hussainweb and others added 2 commits November 27, 2025 08:24
Opcache extension is now bundled by default in PHP 8.5+, causing
installation errors when attempting to install it via docker-php-ext-install.

This change extracts the PHP version from the PHP_VERSION build argument
and uses a case statement to conditionally include opcache only for
PHP versions below 8.5.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@hussainweb hussainweb merged commit 20f1991 into main Nov 27, 2025
16 checks passed
@hussainweb hussainweb deleted the feat/add-php-8.5-support branch November 27, 2025 16:46
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