-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add PHP 8.4 support #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add Dockerfile for PHP 8.4 with all required extensions - Add tests.yaml for PHP 8.4 extension verification - Extensions included: Redis, Swoole, Imagick, YAML, MaxMindDB, Scrypt, Zstd, Brotli, Snappy, LZ4, XDebug - Uses PHP 8.4 API version directory (no-debug-non-zts-20240924)
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a new PHP 8.4 multi-stage Dockerfile (Alpine-based) that defines environment variables and build stages to compile and enable multiple extensions (redis, swoole, imagick, yaml, maxminddb, scrypt, zstd, brotli, snappy, lz4, xdebug). The final image installs runtime libraries, copies compiled extension .so files from build stages, generates ini files to enable them, sets timezone, exposes port 80, and uses a persistent command. Also adds php-8.4/tests.yaml to assert presence of nine extensions' shared objects, and updates the GitHub Actions matrix to include PHP 8.4. Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ 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). (4)
🔇 Additional comments (1)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
php-8.4/Dockerfile (1)
184-192: Consolidate extension enablement into a single RUN command to reduce image layers.Currently, each extension is enabled via a separate RUN command (9 commands total), which creates unnecessary Docker image layers and increases the final image size. Consolidate these into a single RUN statement for efficiency.
Apply this diff to consolidate the extension enablement:
-# Enable Extensions -RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini -RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini -RUN echo extension=imagick.so >> /usr/local/etc/php/conf.d/imagick.ini -RUN echo extension=yaml.so >> /usr/local/etc/php/conf.d/yaml.ini -RUN echo extension=scrypt.so >> /usr/local/etc/php/conf.d/scrypt.ini -RUN echo extension=zstd.so >> /usr/local/etc/php/conf.d/zstd.ini -RUN echo extension=brotli.so >> /usr/local/etc/php/conf.d/brotli.ini -RUN echo extension=lz4.so >> /usr/local/etc/php/conf.d/lz4.ini -RUN echo extension=snappy.so >> /usr/local/etc/php/conf.d/snappy.ini +# Enable Extensions +RUN { \ + echo "extension=swoole.so"; \ + echo "extension=redis.so"; \ + echo "extension=imagick.so"; \ + echo "extension=yaml.so"; \ + echo "extension=scrypt.so"; \ + echo "extension=zstd.so"; \ + echo "extension=brotli.so"; \ + echo "extension=lz4.so"; \ + echo "extension=snappy.so"; \ + echo "zend_extension=xdebug.so"; \ +} | tee /usr/local/etc/php/conf.d/extensions.ini > /dev/null
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
php-8.4/Dockerfile(1 hunks)php-8.4/tests.yaml(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). (4)
- GitHub Check: build (8.0)
- GitHub Check: build (8.3)
- GitHub Check: build (8.2)
- GitHub Check: build (8.1)
🔇 Additional comments (1)
php-8.4/Dockerfile (1)
79-86: Verify maxminddb extension is being built and configured correctly.The maxminddb stage exists, but maxminddb is not copied to the final stage (lines 172–181) or enabled (lines 184–192), despite being declared in the ENV variables and PR summary. Confirm whether this is intentional or an oversight. If intentional, remove the stage to reduce build complexity; if not, add the copy and enable steps.
Can you verify:
- Whether the maxminddb stage (line 79) produces a
maxminddb.sofile (or different name)?- Whether maxminddb is intentionally excluded from the final image?
If maxminddb should be included, add these lines to the Dockerfile:
After line 181, add:
+COPY --from=maxmind /usr/local/lib/php/extensions/no-debug-non-zts-20240924/maxminddb.so /usr/local/lib/php/extensions/no-debug-non-zts-20240924/After line 192, add:
+RUN echo extension=maxminddb.so >> /usr/local/etc/php/conf.d/maxminddb.ini
There was a problem hiding this 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 adds support for PHP 8.4 by creating a new Docker image configuration with the same extension set as PHP 8.3. The implementation follows the established pattern from previous PHP versions, using the new PHP 8.4 API version directory no-debug-non-zts-20240924.
- Multi-stage Dockerfile building 11 PHP extensions (Redis, Swoole, Imagick, YAML, Scrypt, Zstd, Brotli, LZ4, Snappy, MaxMindDB, XDebug)
- Tests to verify presence of 9 enabled extensions
- Maintains consistency with PHP 8.3 configuration regarding which extensions are copied and enabled
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| php-8.4/Dockerfile | Multi-stage build configuration for PHP 8.4-cli-alpine with extensions compiled and selectively included in final image |
| php-8.4/tests.yaml | File existence tests for 9 PHP extensions using the PHP 8.4 API version path |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This PR adds support for PHP 8.4.
Changes
php-8.4/Dockerfilewith PHP 8.4 base imagephp-8.4/tests.yamlfor extension verificationExtensions Included
All extensions from PHP 8.3 are included:
Notes
no-debug-non-zts-20240924Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.