Skip to content

[2.x] Modernise PHPUnit configuration#153

Merged
imorland merged 1 commit into
2.xfrom
chore/modernize-phpunit-config
Jun 7, 2026
Merged

[2.x] Modernise PHPUnit configuration#153
imorland merged 1 commit into
2.xfrom
chore/modernize-phpunit-config

Conversation

@imorland

@imorland imorland commented Jun 7, 2026

Copy link
Copy Markdown
Member

Summary

The unit and integration PHPUnit configs still used the PHPUnit 9.3 schema and attributes that have since been removed, so every test run emitted deprecation notices ("OK, but there were issues!").

This updates both configs to the current format, matching other FoF extensions (e.g. fof/seo):

  • reference the local ../vendor/phpunit/phpunit/phpunit.xsd instead of the pinned schema.phpunit.de/9.3 URL
  • add cacheDirectory=".phpunit.cache" (and gitignore it)
  • backupStaticProperties instead of the renamed backupStaticAttributes
  • replace the deprecated <coverage> element with <source>
  • drop the removed convertErrorsToExceptions / convertNoticesToExceptions / convertWarningsToExceptions attributes and the obsolete Mockery TestListener

No test behaviour changes — the suite runs clean with no deprecations.

Update the unit and integration PHPUnit config to the current schema
(matching other FoF extensions): reference the local phpunit.xsd, add a
cacheDirectory, use backupStaticProperties, replace the deprecated
<coverage> element with <source>, and drop the removed
convert*ToExceptions attributes and the Mockery TestListener. Ignore the
new .phpunit.cache directory.

Removes the PHPUnit deprecation notices emitted on every test run.
@imorland imorland requested a review from a team as a code owner June 7, 2026 16:46
@imorland imorland changed the title Modernise PHPUnit configuration [2.x] Modernise PHPUnit configuration Jun 7, 2026
@imorland imorland merged commit 788fd8b into 2.x Jun 7, 2026
20 checks passed
@imorland imorland deleted the chore/modernize-phpunit-config branch June 7, 2026 16:47
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