Skip to content

Chore: Fix dev env friction, bump PHP floor to 8.3, add PHP matrix#245

Merged
loks0n merged 2 commits intomainfrom
cicd-devenv-fixes
Apr 24, 2026
Merged

Chore: Fix dev env friction, bump PHP floor to 8.3, add PHP matrix#245
loks0n merged 2 commits intomainfrom
cicd-devenv-fixes

Conversation

@loks0n
Copy link
Copy Markdown
Contributor

@loks0n loks0n commented Apr 24, 2026

Summary

Cleanup after setting up the dev environment from scratch. Three themes:

Local dev parity with CI

  • Dockerfile.fpm / Dockerfile.swoole now include composer, composer.json, composer.lock, phpstan.neon, and pint.json, so docker compose exec fpm composer {test,analyze,format:check} all work. Previously pint ran 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 (webfpm), dropped stale psalm line (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

  • Dropped PHP 8.2 support. require.php and the config.platform.php pin are now >=8.3 / 8.3. Dockerfile.fpm bumped to php:8.3-fpm-alpine. README and Getting-Started guide updated.
  • CI unit job is now a matrix over 8.3 / 8.4 / 8.5 with per-version composer cache keys and fail-fast: false.
  • Coverage (pcov + clover artifact) collected on the 8.3 leg only — floor version is the canonical coverage target.
  • analyze job bumped to 8.3 too.

Misc

  • example/docker-compose.yml: dropped deprecated version: '3'.

Left for a follow-up (discussed but out of scope here): moving the format job 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 fpm container (PHP 8.3.30):

  • composer test — 101 tests, 295 assertions, all green
  • composer analyze — PHPStan no errors
  • composer format:check — PER preset, 31 files pass
  • e2e-fpm + e2e-swoole suites pass via docker compose exec
  • CI matrix (8.3 / 8.4 / 8.5) — will run on this PR

🤖 Generated with Claude Code

- 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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

k6 benchmark

Throughput Requests Fail rate p50 p95
8030 req/s 562127 0% 4.67 ms 12.09 ms

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-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 24, 2026

Greptile Summary

This PR cleans up dev-environment friction by fixing Dockerfile parity with CI (adding composer, config files), correcting the CONTRIBUTING.md instructions, bumping the PHP floor to 8.3 consistently across all configuration files, and adding a PHP 8.3/8.4/8.5 matrix to the unit job with pcov coverage collected on the 8.3 leg only. One minor inconsistency: the composer.lock plugin-api-version regressed from 2.9.0 to 2.6.0, suggesting the lock file was regenerated with an older Composer than the composer:2.7 pinned in the Dockerfiles.

Confidence Score: 5/5

Safe 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 plugin-api-version mismatch (P2), which will not break builds.

composer.lock — minor Composer version inconsistency worth cleaning up before the next lock-file churn.

Important Files Changed

Filename Overview
.github/workflows/ci.yml PHP matrix (8.3/8.4/8.5) added for unit job, per-version cache keys, coverage on 8.3 only; minor issue with always() usage on upload step and plugin-api-version downgrade in lock file
composer.json PHP floor bumped from >=8.2 to >=8.3 in both require.php and config.platform.php; consistent change
composer.lock Platform PHP updated to >=8.3/8.3; plugin-api-version downgraded from 2.9.0 to 2.6.0 and empty maps changed from {} to [], suggesting an older Composer version was used to regenerate the lock file
Dockerfile.fpm Base image bumped to php:8.3-fpm-alpine; Composer 2.7 binary added; composer.json, composer.lock, phpstan.neon, pint.json copied for in-container script execution
Dockerfile.swoole Composer 2.7 binary added; composer.json, composer.lock, phpstan.neon, pint.json copied for in-container script execution; mirrors fpm changes
CONTRIBUTING.md Replaced stale docker exec instructions (wrong service name web, removed psalm); added host-native inner loop and container e2e paths
README.md System requirements updated from PHP 8.2 to 8.3
example/docker-compose.yml Removed deprecated version: '3' top-level key
docs/Getting-Starting-Guide.md PHP requirement note updated from 8.2 to 8.3

Reviews (1): Last reviewed commit: "Chore: Regenerate composer.lock for PHP ..." | Re-trigger Greptile

Comment thread composer.lock
},
"plugin-api-version": "2.9.0"
"plugin-api-version": "2.6.0"
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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.

@loks0n loks0n merged commit 60bcad8 into main Apr 24, 2026
9 checks passed
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.

1 participant