Skip to content

Fix PHPUnit deprecation warnings in integration tests#24271

Draft
tzi wants to merge 1 commit into5.x-devfrom
fix-phpunit-warning
Draft

Fix PHPUnit deprecation warnings in integration tests#24271
tzi wants to merge 1 commit into5.x-devfrom
fix-phpunit-warning

Conversation

@tzi
Copy link
Copy Markdown
Contributor

@tzi tzi commented Mar 26, 2026

Description

This PR removes PHPUnit deprecation warnings in affected integration tests to improve PHPUnit 10 compatibility.

Fixes in the plugins

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

Review

@tzi tzi added this to the 5.9.0 milestone Mar 26, 2026
@tzi tzi added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Mar 26, 2026
@tzi tzi marked this pull request as ready for review March 27, 2026 02:39
@tzi tzi requested a review from a team March 27, 2026 02:40
$this->assertNotEmpty($dao->countVisitsWithDatesLimit($from, $to));
}

private function assertDoesNotMatchRegularExpressionCompat(string $pattern, string $value): void
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm personally not a fan of adding such compat methods unless they are required. A deprecation message might be annoying, but it doesn't break things. But such a compat method might remain in the code later even if we update the phpunit library with Matomo 6. So it imho increases the risk to produce more technical debt, rather then reducing it.
But if anyone else has the opinion it's better to hide deprecations that are only visible in tests/development, I have no problem bowing to the majority.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss that later then!

@tzi tzi marked this pull request as draft March 30, 2026 07:22
@sgiehl sgiehl modified the milestones: 5.9.0, 5.10.0 Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.

Development

Successfully merging this pull request may close these issues.

2 participants