Upgrade PHP to 8.5 and validators to 0.3.*#919
Conversation
- Bump PHP requirement to >=8.5 in composer.json and composer.lock - Upgrade utopia-php/validators to 0.3.* - Update Dockerfile to php:8.5-cli-alpine with dynamic extension paths - Bump MongoDB driver to 2.3.3 for PHP 8.5 compatibility Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe PHP build targets updated runtime and extension versions, collects compiled extensions under ChangesPHP build and package requirements
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Greptile SummaryThis PR upgrades the library to PHP 8.5 by bumping the base image to
Confidence Score: 5/5The change is a straightforward PHP version upgrade with a well-scoped Dockerfile refactor; the dynamic extension path approach is the correct long-term fix. The core upgrade is clean: the composer changes are minimal and consistent, and the Dockerfile switch to php-config --extension-dir is a clear improvement over hardcoded ABI strings. The only noted issue is that opcache was dropped from the docker-php-ext-install call without being re-enabled, leaving its enable_cli config as a no-op — this does not break any tests or adapters. Dockerfile — specifically whether opcache needs to be explicitly re-enabled after being removed from the docker-php-ext-install line. Important Files Changed
Reviews (4): Last reviewed commit: "Fix mongodb/opcache/swoole builds for PH..." | Re-trigger Greptile |
- Bump Xdebug to 3.5.3 (3.4.2 does not support PHP 8.5, broke the build) - Enable opcache/pgsql/pdo_mysql/pdo_pgsql after building them (Greptile P1) - Pin base image to php:8.5.8-cli-alpine for reproducible builds (Greptile P2) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Use docker-php-ext-install for opcache/pgsql/pdo_mysql/pdo_pgsql instead of a hand-rolled loop that silently skipped opcache (loop exit status masked the failure) and never enabled the extensions - Bump Swoole to v6.2.2 (6.1.x does not support PHP 8.5; 6.2.0+ required) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Dockerfile (1)
70-72: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winBump
swoole/ide-helperto the latest 6.x release.composer.jsonstill pinsswoole/ide-helperto5.1.3, while the Dockerfile builds Swoole 6.x. Packagist already has6.0.2, so the current stubs are behind the runtime and may miss newer APIs.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Dockerfile` around lines 70 - 72, Update the swoole/ide-helper dependency in composer.json from 5.1.3 to the latest 6.x release, 6.0.2, so the IDE stubs match the Swoole 6.x runtime built by the Dockerfile.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@Dockerfile`:
- Around line 70-72: Update the swoole/ide-helper dependency in composer.json
from 5.1.3 to the latest 6.x release, 6.0.2, so the IDE stubs match the Swoole
6.x runtime built by the Dockerfile.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9d72ae44-4509-4016-95be-c7072db90d3d
⛔ Files ignored due to path filters (1)
composer.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
Dockerfilecomposer.json
- Build mongodb from source and locate the .so with find (pecl's make install target 'install-modules' fails: cp modules/* finds nothing on this image) - Drop opcache from docker-php-ext-install; it is compiled statically into the php:8.5 base image already (produces no shared .so to install) - Add openssl-dev so Swoole 6.2.2 configure finds libssl (it was previously pulled in transitively by libpq-dev, which is purged) Full image build verified locally: mongodb, redis, swoole, pcov, pdo_mysql, pdo_pgsql, pgsql, opcache, mbstring all load. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
>=8.5(composer.json+composer.lock)utopia-php/validatorsto0.3.*(0.3.0)Dockerfilebase image tophp:8.5-cli-alpinephp-config --extension-dir) instead of hardcoded API-version directories, so the build no longer breaks on PHP's new extension ABI number2.3.3for PHP 8.5 compatibilityfilepackage and build extensions from source where needed for the 8.5 imageWhy
Move the library onto PHP 8.5 and the matching validators release line.
🤖 Generated with Claude Code
Summary by CodeRabbit
Compatibility
Bug Fixes
Chores