Skip to content

⬆️ Upgrade PHPUnit to 12 & test Symfony 7.4/8.1 in CI - #27

Merged
damienlagae merged 5 commits into
mainfrom
chore/phpunit-12-symfony-matrix
Jul 13, 2026
Merged

damienlagae merged 5 commits into
mainfrom
chore/phpunit-12-symfony-matrix

Conversation

@damienlagae

Copy link
Copy Markdown
Member

Contexte

Après un composer update, aucune dépréciation runtime n'était remontée (tests verts, PHPStan clean). Le seul point mort restant était PHPUnit 9.6, en fin de vie et incompatible à terme avec PHP 8.4.

Changements

⬆️ Migration PHPUnit 9.6 → 12

  • phpunit/phpunit bumpé en ^12.0
  • phpunit.xml.dist migré au schéma 12.x : <source>, <extensions>, cacheDirectory
  • Remplacement du SymfonyTestsListener (supprimé) par SymfonyExtension
  • Suppression de convertDeprecationsToExceptions (supprimé dès PHPUnit 10)
  • ModalTest : stubs au lieu de mocks non configurés → plus aucune PHPUnit notice
  • Normalisation des contraintes de version dans composer.json

👷 CI : test d'installation multi-Symfony

Nouveau job matrice qui vérifie l'installation et les tests sur :

  • Symfony 7.4 (PHP 8.3)
  • Symfony 8.1 (PHP 8.4)

via symfony/flex + SYMFONY_REQUIRE.

Validation locale

  • 246 tests, 676 assertions, 0 issue
  • PHPStan clean, php-cs-fixer clean
  • Install testée sur Symfony 7.4.14 et 8.1.1 → OK dans les deux cas

Note

Aucune release nécessaire : rien dans src/ ne change, uniquement l'outillage de test et la CI.

- bump phpunit/phpunit to ^12.0
- migrate phpunit.xml.dist to the 12.x schema (source, extensions, cacheDirectory)
- replace the removed SymfonyTestsListener with SymfonyExtension
- use stubs instead of unconfigured mocks in ModalTest to clear PHPUnit notices
- normalize composer.json version constraints
simple-phpunit from the bridge is incompatible with PHPUnit 12, so run
vendor/bin/phpunit directly across a PHP highest/lowest/dev matrix.
The Enabel/CI reusable workflows repository is archived, so run these
checks locally with checkout@v5 and the project's pinned tools.
@damienlagae
damienlagae merged commit fb3525f into main Jul 13, 2026
9 checks passed
@damienlagae
damienlagae deleted the chore/phpunit-12-symfony-matrix branch July 13, 2026 12:56
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