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

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

Build:
Build:
LAST BUILD BRANCH: 4.x
DEFAULT BRANCH: 3.x
Ran 06 Sep 2024 04:54PM UTC
Jobs 31
Files 37
Run time 1min
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

06 Sep 2024 04:53PM UTC coverage: 95.846%. Remained the same
10742185032

push

github

jrfnl
Tests: add `Before/After[Class]` attributes

PHPUnit 10 introduced attributes as replacements for docblock annotations.
PHPUnit 11 deprecates the use of docblock annotations in favour of attributes.

If both an attribute as well as an annotation are found, no PHPUnit deprecation warning will be thrown.

However, between PHPUnit 10.0 and PHPUnit 11.3.2, if the `failOnDeprecation` is set to `true` (which it is for this library as the builds should fail on deprecations in PHP), builds will _also_ fail on deprecation notices from PHPUnit itself.

This behaviour was (finally) changed in PHPUnit 10.5.32 and 11.3.3 (released this week), but that's insufficient for our needs.
For this library running the tests on high/low PHPUnit on each PHP version is imperative. It is also not the job of this library to decide the target PHPUnit versions for the consumer projects, so we cannot raise the minimum PHPUnit 11 version to 11.3.3.

This means that without the attributes, the test runs for the package would fail on PHPUnit 11.0.0 - 11.3.2.

As these attributes are already available in PHPUnit 10, it makes sense then to add them for both the 2.x branch, as well as the (upcoming) 3.x branch.

This commit adds the `Before/After*` attributes in all the appropriate places.

The `@before/after*` annotations remain as the tests also still need to run on PHP 5.6 - 8.0 using PHPUnit 5.x - 9.x.
These can be removed once the codebase has a PHP 8.1/PHPUnit 10 minimum requirement.

Note: due to the syntax for attributes, these can be safely added as they are ignored as comments on PHP < 8.0.
Along the same line, if there is no "listener" for the attributes (PHP 8.0/PHPUnit 9.x), they are ignored by PHP as well.

2 of 2 new or added lines in 1 file covered. (100.0%)

623 of 650 relevant lines covered (95.85%)

130.08 hits per line

Jobs
ID Job ID Ran Files Coverage
1 php-7.4-phpunit-8.1.6 - 10742185032.1 06 Sep 2024 04:54PM UTC 0
56.23
GitHub Action Run
2 php-8.3-phpunit-phar-10 - 10742185032.2 06 Sep 2024 04:55PM UTC 0
5.65
GitHub Action Run
3 php-7.1-phpunit-auto - 10742185032.3 06 Sep 2024 04:54PM UTC 0
55.68
GitHub Action Run
4 php-8.2-phpunit-auto - 10742185032.4 06 Sep 2024 04:54PM UTC 0
5.65
GitHub Action Run
5 php-7.1-phpunit-5.7.21 - 10742185032.5 06 Sep 2024 04:54PM UTC 0
75.86
GitHub Action Run
6 php-7.2-phpunit-phar-8.0 - 10742185032.6 06 Sep 2024 04:55PM UTC 0
56.07
GitHub Action Run
7 php-7.3-phpunit-phar-9.0 - 10742185032.7 06 Sep 2024 04:54PM UTC 0
51.19
GitHub Action Run
8 php-8.1-phpunit-10.0.12 - 10742185032.8 06 Sep 2024 04:54PM UTC 0
14.66
GitHub Action Run
9 php-7.2-phpunit-phar-6 - 10742185032.9 06 Sep 2024 04:54PM UTC 0
75.73
GitHub Action Run
10 php-8.1-phpunit-auto - 10742185032.10 06 Sep 2024 04:55PM UTC 0
5.65
GitHub Action Run
11 php-8.0-phpunit-9.3.0 - 10742185032.11 06 Sep 2024 04:54PM UTC 0
48.35
GitHub Action Run
12 php-7.4-phpunit-auto - 10742185032.12 06 Sep 2024 04:55PM UTC 0
26.84
GitHub Action Run
13 php-7.3-phpunit-7.2.7 - 10742185032.13 06 Sep 2024 04:54PM UTC 0
75.9
GitHub Action Run
14 php-7.0-phpunit-auto - 10742185032.14 06 Sep 2024 04:55PM UTC 0
75.37
GitHub Action Run
15 php-8.1-phpunit-9.3.0 - 10742185032.15 06 Sep 2024 04:54PM UTC 0
48.35
GitHub Action Run
16 php-7.4-phpunit-9.6.10 - 10742185032.16 06 Sep 2024 04:54PM UTC 0
36.21
GitHub Action Run
17 php-7.4-phpunit-phar-8 - 10742185032.17 06 Sep 2024 04:54PM UTC 0
52.24
GitHub Action Run
18 php-8.3-phpunit-auto - 10742185032.18 06 Sep 2024 04:54PM UTC 0
5.65
GitHub Action Run
19 php-8.3-phpunit-phar-9 - 10742185032.19 06 Sep 2024 04:55PM UTC 0
25.92
GitHub Action Run
20 php-8.3-phpunit-10.1.0 - 10742185032.20 06 Sep 2024 04:54PM UTC 0
5.65
GitHub Action Run
21 php-8.1-phpunit-phar-10.0 - 10742185032.21 06 Sep 2024 04:55PM UTC 0
15.26
GitHub Action Run
22 php-8.2-phpunit-9.3.0 - 10742185032.22 06 Sep 2024 04:54PM UTC 0
48.16
GitHub Action Run
23 php-7.0-phpunit-5.7.27 - 10742185032.23 06 Sep 2024 04:55PM UTC 0
75.86
GitHub Action Run
24 php-5.6-phpunit-auto - 10742185032.24 06 Sep 2024 04:54PM UTC 0
64.71
GitHub Action Run
25 php-8.0-phpunit-auto - 10742185032.25 06 Sep 2024 04:55PM UTC 0
25.74
GitHub Action Run
26 php-7.2-phpunit-auto - 10742185032.26 06 Sep 2024 04:54PM UTC 0
51.6
GitHub Action Run
27 php-7.3-phpunit-phar-7 - 10742185032.27 06 Sep 2024 04:54PM UTC 0
56.39
GitHub Action Run
28 php-5.6-phpunit-5.7.21 - 10742185032.28 06 Sep 2024 04:54PM UTC 0
64.71
GitHub Action Run
29 php-7.3-phpunit-auto - 10742185032.29 06 Sep 2024 04:54PM UTC 0
26.84
GitHub Action Run
30 php-7.1-phpunit-phar-5 - 10742185032.30 06 Sep 2024 04:54PM UTC 0
75.86
GitHub Action Run
31 php-7.2-phpunit-6.3.1 - 10742185032.31 06 Sep 2024 04:54PM UTC 0
76.38
GitHub Action Run
Source Files on build 10742185032
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #10742185032
  • 5cecae14 on github
  • Prev Build on feature/2.x/add-attributes-for-annotations (#10742054347)
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