Skip to content

feat: support PHPUnit 12 - #56

Merged
jdreesen merged 1 commit into
mainfrom
feature/phpunit-12-support
Oct 6, 2026
Merged

jdreesen merged 1 commit into
mainfrom
feature/phpunit-12-support

Conversation

@jdreesen

@jdreesen jdreesen commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Allow phpunit/phpunit ^12.5 and extend the CI matrix (PHP >= 8.3 only, plus lowest-dependency runs; --fail-on-risky now applies to the newest PHPUnit).
  • src/ needed no changes: every hook already carries an attribute besides its annotation (PHPUnit 12 ignores annotations), and the PHPUnit internals used by AttributeProvider are unchanged in 12.5.
  • PHPUnit 12 validates the argument count while loading a data provider, i.e. before this library strips KernelConfiguration/PimcoreConfiguration objects from the provided data, and warns about it (failing runs with failOnWarning). Affected tests pass validateArgumentCount positionally (#[DataProvider('...', false)]), which PHPUnit 10/11 ignore, whereas the named argument would fail there with Unknown named parameter.
  • README documents the warning for consumers (named argument for PHPUnit 12 only projects, positional/variadic variant for projects supporting several versions); CHANGELOG entry added under v0.15.1.
  • Dropped the deprecated cacheDirectory attribute from <coverage> in phpunit.xml.dist.

Test plan

  • Full suite locally with PHPUnit 12.5.38 / PHP 8.5.9 / --fail-on-risky: 109 tests, 0 failures, 0 warnings (remaining deprecations are PDO::MYSQL_ATTR_INIT_COMMAND from symfony/yaml on PHP 8.5)
  • CI matrix incl. new PHPUnit 12 jobs and lowest-dependency runs (all green; the dama/doctrine-test-bundle lower bound did not need raising)
  • PHPUnit 9/10/11 jobs still green with the positional false argument

🤖 Generated with Claude Code

Allow PHPUnit ^12.5 and extend the CI matrix accordingly (PHP >= 8.3 only,
plus lowest-dependency runs). src/ needed no changes: all hooks already carry
attributes besides their annotations, and the PHPUnit internals used by
AttributeProvider are unchanged.

PHPUnit 12 validates the argument count while loading a data provider, i.e.
before this library strips KernelConfiguration/PimcoreConfiguration objects
from the provided data, and warns about it. The affected tests pass
`validateArgumentCount` positionally (`#[DataProvider('...', false)]`), which
PHPUnit 10/11 ignore, whereas the named argument would fail there. The README
documents both variants for consumers.

Also drop the deprecated cacheDirectory attribute from <coverage> in
phpunit.xml.dist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jdreesen jdreesen mentioned this pull request Oct 5, 2026
4 tasks done
@jdreesen
jdreesen added this pull request to stack #58 October 5, 2026 16:19
@jdreesen
jdreesen requested a review from lukadschaak October 5, 2026 16:37
@jdreesen
jdreesen merged commit 5384438 into main Oct 6, 2026
39 checks passed
@jdreesen
jdreesen deleted the feature/phpunit-12-support branch October 6, 2026 15:40
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.

2 participants