Dev tooling: PHPStan, PHP-CS-Fixer, PHPUnit + container MCP wiring #29

Closed
opened 2026-06-14 23:39:17 +02:00 by myrmidex · 1 comment
Owner

Set up the quality/test toolchain on the new stack.

  • PHPStan (with Symfony extension) for static analysis.
  • PHP-CS-Fixer (or Pint) for code style.
  • PHPUnit configured for Symfony (KernelTestCase/WebTestCase, .env.test, test DB).
  • Wire the container MCP tools (container_test, container_lint, container_analyse) to the Symfony equivalents.

Exit: lint, analyse, and test all run green on the skeleton via the MCP tools.

Set up the quality/test toolchain on the new stack. - PHPStan (with Symfony extension) for static analysis. - PHP-CS-Fixer (or Pint) for code style. - PHPUnit configured for Symfony (`KernelTestCase`/`WebTestCase`, `.env.test`, test DB). - Wire the container MCP tools (`container_test`, `container_lint`, `container_analyse`) to the Symfony equivalents. Exit: lint, analyse, and test all run green on the skeleton via the MCP tools.
myrmidex added this to the v0.3.0 milestone 2026-06-14 23:39:17 +02:00
myrmidex added the
enhancement
label 2026-06-14 23:39:17 +02:00
myrmidex self-assigned this 2026-06-14 23:39:17 +02:00
Author
Owner

Done (3 commits). Toolchain green via dev-* nix-shell wrappers:

  • PHPUnit (symfony/test-pack) → dev-test. Real Postgres test DB (buckets_test), not SQLite.
  • PHPStan level 6 + phpstan-symfony/phpstan-doctrine → dev-stan. No baseline (greenfield); documented ignoreErrors/excludePaths for the two framework/recipe false-positives.
  • php-cs-fixer @Symfony + @Symfony:riskydev-cs / dev-cs-fix.

Scope change (decided in #28 too): the container MCP tools (container_test/lint/analyse) are Laravel-only — they hard-require docker/dev/docker-compose.yml and run php artisan test. Both fatal for Symfony. Replaced with dev-test/dev-stan/dev-cs wrappers in shell.nix. The "wire MCP tools" sub-goal is satisfied by this wrapper approach instead.

Gotcha logged: @Symfony:risky mangled prose in the auto-generated config/reference.php (rewrote @type@var in a doc comment) — excluded generated config from the fixer.

Done (3 commits). Toolchain green via `dev-*` nix-shell wrappers: - **PHPUnit** (`symfony/test-pack`) → `dev-test`. Real Postgres test DB (`buckets_test`), not SQLite. - **PHPStan** level 6 + phpstan-symfony/phpstan-doctrine → `dev-stan`. No baseline (greenfield); documented `ignoreErrors`/`excludePaths` for the two framework/recipe false-positives. - **php-cs-fixer** `@Symfony` + `@Symfony:risky` → `dev-cs` / `dev-cs-fix`. **Scope change (decided in #28 too):** the container MCP tools (`container_test/lint/analyse`) are **Laravel-only** — they hard-require `docker/dev/docker-compose.yml` and run `php artisan test`. Both fatal for Symfony. Replaced with `dev-test`/`dev-stan`/`dev-cs` wrappers in `shell.nix`. The "wire MCP tools" sub-goal is satisfied by this wrapper approach instead. Gotcha logged: `@Symfony:risky` mangled prose in the auto-generated `config/reference.php` (rewrote `@type`→`@var` in a doc comment) — excluded generated config from the fixer.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/buckets#29
No description provided.