Skip to content

chore: align dev tooling with event-database-imports - #31

Merged
turegjorup merged 1 commit into
developfrom
chore/align-dev-tooling
Jul 7, 2026
Merged

chore: align dev tooling with event-database-imports#31
turegjorup merged 1 commit into
developfrom
chore/align-dev-tooling

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

Align this repo's dev-tooling surface with the canonical event-database-imports setup — its PR #88 raised PHPStan to level 8 with strict rules, and the PHP/tooling versions had drifted apart.

Changes

  • PHPStan 6 → 8 + strict rules — add phpstan/phpstan (explicit) and phpstan/phpstan-strict-rules. Existing findings baselined in phpstan-baseline.neon (34 entries) so new code is held to the higher bar. Exclude the auto-generated config/reference.php, drop tests/ from analysis, and switch to identifier-based ignoreErrors — all matching importers. (Dropped importers' Doctrine/method.unused ignores, which don't apply here.)
  • PHP 8.4 — set itkdev/php8.4-fpm as the committed docker-compose.yml / docker-compose.server.yml default (the dev override already used 8.4; composer.json stays >=8.3).
  • twig-cs-fixer ^3.7^4.0 — config is byte-identical to importers, so v4 lints clean.
  • PHPUnit ^12^13 — pulls php-cs-fixer to 3.95 (matching importers), which applied one else-after-return simplification in ElasticSearchIndex.php.

Not aligned (deliberately)

Importers' doctrine/*, messenger-test, liip/test-fixtures, phpstan-doctrine, and Mate dev deps are specific to its write/admin stack — N/A to this read-only, no-Doctrine API.

Verification

All run in the phpfpm container (PHP 8.4):

  • phpstan analyse (level 8 + strict) → No errors
  • php-cs-fixer check → clean · twig-cs-fixer lint (v4) → OK
  • composer audit --locked → no advisories · composer normalize --dry-run → normalized
  • bin/phpunit (PHPUnit 13) → 19 tests, 44 assertions, OK

Bring the dev-tooling surface in line with the canonical event-database-imports
setup (its PR #88 raised PHPStan and added strict rules):
- PHPStan level 6 -> 8 with phpstan/phpstan-strict-rules, existing findings
baselined (phpstan-baseline.neon) so new code is held to the higher bar.
- Exclude the auto-generated config/reference.php; drop tests/ from analysis
(matching importers) and use identifier-based ignores.
- PHP 8.4 as the committed docker-compose default (dev override already used it).
- twig-cs-fixer ^3.7 -> ^4.0 and PHPUnit ^12 -> ^13; php-cs-fixer follows to
3.95 (one else-after-return fix applied).
phpstan (level 8), php-cs-fixer, twig-cs-fixer, composer audit, and the API
test suite (19 tests) all pass.
@github-actions

Copy link
Copy Markdown

No changes detected in API specification

@turegjorupturegjorup self-assigned this Jul 7, 2026
@turegjorup
turegjorup merged commit 0f60d03 into developJul 7, 2026
12 checks passed
@turegjorup
turegjorup deleted the chore/align-dev-tooling branch July 7, 2026 11:21
Sign up for freeto 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

@turegjorup