Chore: Fix dev env friction, bump PHP floor to 8.3, add PHP matrix#245
Chore: Fix dev env friction, bump PHP floor to 8.3, add PHP matrix#245
Conversation
- Dockerfiles now ship composer, composer.json/lock, phpstan.neon, pint.json so composer scripts (test/analyze/format) work in-container - CONTRIBUTING: document host-native inner loop; fix wrong service name (web -> fpm); drop stale psalm reference; add swoole exec path - Drop PHP 8.2 support; bump require/platform pin and FPM base image to 8.3 - CI unit job runs a matrix over PHP 8.3 / 8.4 / 8.5 with per-version composer cache keys; coverage (pcov + clover artifact) collected on 8.3 - example/docker-compose.yml: drop deprecated version key Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
k6 benchmark
|
The require.php / platform bump changed composer.json's content-hash, so the lock was reporting out-of-date. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR cleans up dev-environment friction by fixing Dockerfile parity with CI (adding Confidence Score: 5/5Safe to merge; all remaining findings are P2 style/consistency observations that don't block CI or correctness. PHP version bumps are consistent across composer.json, composer.lock, Dockerfiles, CI, and docs. The CI matrix, coverage collection, and cache-key changes are all correct. The only finding is a lock-file composer.lock — minor Composer version inconsistency worth cleaning up before the next lock-file churn. Important Files Changed
Reviews (1): Last reviewed commit: "Chore: Regenerate composer.lock for PHP ..." | Re-trigger Greptile |
| }, | ||
| "plugin-api-version": "2.9.0" | ||
| "plugin-api-version": "2.6.0" | ||
| } |
There was a problem hiding this comment.
Composer version mismatch in lock file
The plugin-api-version regressed from 2.9.0 to 2.6.0, and the empty stability-flags/platform-dev entries changed from JSON objects ({}) to arrays ([]). This means the lock file was regenerated with Composer ≈2.6.x on the host, while both Dockerfiles pin COPY --from=composer:2.7. When Composer 2.7 (in the container or CI) reads this lock file it may emit a "lock file is out of date" warning or silently re-normalise the file, causing spurious diffs for other contributors. Regenerating the lock file with composer:2.7 (or whichever version you want to treat as canonical) would keep the file consistent.
Summary
Cleanup after setting up the dev environment from scratch. Three themes:
Local dev parity with CI
Dockerfile.fpm/Dockerfile.swoolenow includecomposer,composer.json,composer.lock,phpstan.neon, andpint.json, sodocker compose exec fpm composer {test,analyze,format:check}all work. Previouslypintran with the Laravel default preset in-container (pint.json wasn't copied), reporting 27 false-positive style issues that CI didn't see.CONTRIBUTING.md: fixed wrong service name (web→fpm), dropped stalepsalmline (it's not a dep), documented the host-native inner loop (composer install && composer test) and the adapter-container e2e path for both FPM and Swoole.PHP version policy
require.phpand theconfig.platform.phppin are now>=8.3/8.3.Dockerfile.fpmbumped tophp:8.3-fpm-alpine. README and Getting-Started guide updated.8.3 / 8.4 / 8.5with per-version composer cache keys andfail-fast: false.analyzejob bumped to 8.3 too.Misc
example/docker-compose.yml: dropped deprecatedversion: '3'.Left for a follow-up (discussed but out of scope here): moving the
formatjob off docker-in-docker and onto setup-php, and making swoole e2e run natively on the runner (needs small source changes to parameterize port + base URL).Test plan
Verified locally inside the rebuilt
fpmcontainer (PHP 8.3.30):composer test— 101 tests, 295 assertions, all greencomposer analyze— PHPStan no errorscomposer format:check— PER preset, 31 files passdocker compose exec🤖 Generated with Claude Code