Skip to content

Allow PHPUnit 11 and 12 - #8

Merged
acirtautas merged 1 commit into
mainfrom
phpunit-12
Aug 5, 2026
Merged

Allow PHPUnit 11 and 12#8
acirtautas merged 1 commit into
mainfrom
phpunit-12

Conversation

@acirtautas

Copy link
Copy Markdown
Contributor

Change

Dev-only: phpunit/phpunit moves from the EOL ^10.5 to ^11.5 || ^12.5. Nothing changes for consumers of the plugin.

Why the OR constraint: PHPUnit 12 requires PHP >= 8.3, while this plugin supports and CI-tests PHP 8.2. With the OR, PHP 8.3+ resolves PHPUnit 12.5 on highest deps, and PHP 8.2 (and every --prefer-lowest leg) resolves PHPUnit 11.5 - the whole existing CI matrix keeps passing without workflow changes. PHPUnit 13 is deliberately not included yet (it would silently move the PHP 8.4/8.5 legs onto an unvetted major).

  • phpunit.xml.dist needs no changes - it already uses the attribute subset shared by 10/11/12 (--migrate-configuration confirms "does not need to be migrated"), and its schema reference tracks the installed version.
  • The tests were already attribute-based with static data providers; the one thing PHPUnit 12 flagged was a Twig\Environment mock created without expectations in the HTTP response provider test - now a stub, as it should have been.

Verified

  • PHPUnit 12.5 (highest deps): 109 tests green, no PHPUnit notices.
  • PHPUnit 11.5 (composer update --prefer-lowest --prefer-stable): 109 tests green. The lowest legs report vendor-caused risky warnings ("did not remove its own exception handlers" from the older Symfony error handler on functional tests) - cosmetic, non-failing, and unrelated to this change.
  • phpstan level 9, ecs, behat --strict (15 scenarios) - green on both resolutions.

The suite ran on the EOL PHPUnit 10.5 line. The constraint becomes
^11.5 || ^12.5: PHP 8.3+ resolves PHPUnit 12, while PHP 8.2 - still
supported and CI-tested - stays on PHPUnit 11 (PHPUnit 12 requires
PHP 8.3). phpunit.xml.dist already uses the shared 10/11/12 attribute
subset and needs no changes.

The one thing PHPUnit 12 flagged: the HTTP response provider test
mocked Twig without configuring expectations - it is a stub.
@acirtautas
acirtautas merged commit 74a8ebb into main Aug 5, 2026
8 checks passed
@acirtautas
acirtautas deleted the phpunit-12 branch August 5, 2026 13:29
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