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

Yoast / PHPUnit-Polyfills / 16857068151 / 2
96%
3.x: 98%

Build:
Build:
LAST BUILD BRANCH: 4.x
DEFAULT BRANCH: 3.x
Ran 10 Aug 2025 04:15AM UTC
Files 41
Run time 9s
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

10 Aug 2025 04:03AM UTC coverage: 68.829%. Remained the same
16857068151.2

push

github

jrfnl
PHP 8.5 | Tests: prevent deprecation notice for Reflection*::setAccessible()

Since PHP 8.1, calling the `Reflection*::setAccessible()` methods is no longer necessary as reflected properties/methods/etc will always be accessible.
However, the method calls are still needed for PHP < 8.1.

As of PHP 8.5, calling the `Reflection*::setAccessible()` methods is now formally deprecated and will yield a deprecation notice, which will fail test runs.
As of PHP 9.0, the `setAccessible()` method(s) will be removed.

With the latter in mind, this commit prevents the deprecation notice by making the calls to `setAccessible()` conditional.

Silencing the deprecation would mean, this would need to be "fixed" again come PHP 9.0, while the current solution should be stable, including for PHP 9.0.

Ref: https://wiki.php.net/rfc/deprecations_php_8_5#extreflection_deprecations

488 of 709 relevant lines covered (68.83%)

4.37 hits per line

Source Files on job php-5.4-phpunit-auto - 16857068151.2
  • Tree
  • List 41
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 16857068151
  • 5c49998f on github
  • Prev Job for on feature/fix-runtime-deprecations-php-8.5 (#16580007518.8)
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

© 2025 Coveralls, Inc