chore(deps): upgrade PHPUnit to ^13 to clear security advisories#216
Merged
gaelreyrol merged 2 commits intoFriendsOfOpenTelemetry:mainfrom Apr 18, 2026
Merged
Conversation
Bump phpunit/phpunit from ^11.5 to ^13.0 since all reachable 11.5.x releases are now blocked by Packagist advisories (PKSA-5jz8-6tcw-pbk4, PKSA-z3gr-8qht-p93v). PHPUnit 13 requires PHP 8.4+, so the PHPUnit CI job narrows to 8.4 only. To preserve declared runtime compatibility with PHP 8.2/8.3, PHPStan now analyses against a phpVersion range (min: 80200, max: 80400) — catching both too-new syntax and features removed before 8.4. PHPStan still runs in CI across 8.2/8.3/8.4 as the static replacement for the dropped PHPUnit coverage. PHP-CS-Fixer matrix collapses to PHP 8.2 only (its output is deterministic across runtimes; 8.2 is the lowest supported, matching the tool's own guidance). Also removes redundant @coversDefaultClass doc-comments from three test files; each already carries an equivalent #[CoversClass] attribute.
PHPUnit 13 rejects #[CoversClass] targets outside the <source> coverage
include when --coverage-clover is active. DummyLoggerService and
DummyMeterService live in the test application (tests/Functional/Application/src),
so the attributes were already incorrect — drop them; these are functional
integration tests, not unit coverage tests. Locally masked by XDEBUG_MODE=off
in composer run test.
Narrow PHPStan CI matrix to PHP 8.4 only. Installing project vendor on 8.2/8.3
now fails because phpunit/phpunit ^13 requires PHP 8.4+. Cross-version static
analysis is driven by phpVersion: {min: 80200, max: 80400} in phpstan.neon and
is runtime-independent — running PHPStan on three PHP versions was redundant.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #216 +/- ##
============================================
- Coverage 91.25% 91.21% -0.04%
Complexity 692 692
============================================
Files 116 116
Lines 2789 2789
============================================
- Hits 2545 2544 -1
- Misses 244 245 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
phpunit/phpunitfrom^11.5to^13.0. All currently reachable 11.5.x releases are blocked by Packagist security advisories (PKSA-5jz8-6tcw-pbk4,PKSA-z3gr-8qht-p93v), socomposer updatefails as-is.composer.json; PHPStan now analyses against aphpVersionrange (min: 80200, max: 80400) across 8.2/8.3/8.4 in CI as the static replacement for the dropped PHPUnit coverage.@coversDefaultClassdoc-comments; each already carries an equivalent#[CoversClass]attribute (deprecated in 12+).Test plan
composer updateresolves with no security-advisory errorscomposer run test— 411 tests pass (9 pre-existing skips) on PHPUnit 13.1.7composer run phpstan— clean across the 80200–80400 range, no baseline changes neededcomposer run php-cs-fixer:lint— clean