• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / PHPUnit-Polyfills / 10630196724 / 22
96%
3.x: 98%

Build:
Build:
LAST BUILD BRANCH: 4.x
DEFAULT BRANCH: 3.x
Ran 30 Aug 2024 09:24AM UTC
Files 41
Run time 17s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Aug 2024 09:22AM UTC coverage: 61.437%. Remained the same
10630196724.22

push

github

jrfnl
PHP 8.4 | Silence deprecation notice in the tests

PHP 8.4 deprecates passing `E_USER_ERROR` to `trigger_error()`, with the recommendation being to replace these type of calls with either an Exception or an `exit` statement.

As this is a test related to the PHPUnit `expectError()` assertion, the basic principle of the test cannot be changed without the test losing its validity.

Instead, this commit silences the PHP 8.4 deprecation notice specifically for PHP 8.4+.

Notes:
* The error silencing can not be added unconditionally as on PHP < 8.0, this would also silence the actual error, not just the deprecation notice.
* The commit also already adds a PHPUnit `@requires` annotation to indicate that the test should be skipped on PHP 9.0 as the deprecation will become an error in PHP 9.0.
    This `@requires` annotation with an operator is not supported in older PHPUnit version, but that just means the annotation will be ignored and the test will run, which is exactly what is supposed to happen ;-)

Refs:
* https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
* https://www.php.net/manual/en/language.operators.errorcontrol.php

419 of 682 relevant lines covered (61.44%)

4.55 hits per line

Source Files on job php-7.1-phpunit-5.7.21 - 10630196724.22
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10630196724
  • 7ecb112f on github
  • Prev Job for on feature/1.x-php-8.4-restrict-test (#9944025968.23)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc