Skip to content

Commit ff2b781

Browse files
committed
chore(deps): upgrade PHPUnit to ^13 to clear security advisories
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.
1 parent 6a48d3a commit ff2b781

7 files changed

Lines changed: 5 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
matrix:
1818
php:
1919
- '8.2'
20-
- '8.3'
21-
- '8.4'
2220
fail-fast: false
2321
steps:
2422
- name: Checkout
@@ -95,21 +93,13 @@ jobs:
9593
strategy:
9694
matrix:
9795
php:
98-
- '8.2'
99-
- '8.3'
10096
- '8.4'
10197
dependencies:
10298
- 'highest'
10399
include:
104100
- php: '8.4'
105101
dependencies: 'highest'
106102
coverage: true
107-
- php: '8.3'
108-
dependencies: 'highest'
109-
coverage: true
110-
- php: '8.2'
111-
dependencies: 'highest'
112-
coverage: true
113103
fail-fast: false
114104
steps:
115105
- name: Checkout

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"open-telemetry/exporter-otlp": "^1",
6060
"open-telemetry/exporter-zipkin": "^1",
6161
"open-telemetry/transport-grpc": "^1",
62-
"phpunit/phpunit": "^11.5",
62+
"phpunit/phpunit": "^13.0",
6363
"pyrech/composer-changelogs": "^2.2",
6464
"roave/security-advisories": "dev-master",
6565
"symfony/browser-kit": "^7.4",

phpstan.neon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
phpVersion: 80200
5+
phpVersion:
6+
min: 80200
7+
max: 80400
68
level: 6
79
paths:
810
- src/

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/13.0/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
55
executionOrder="depends,defects"
66
beStrictAboutOutputDuringTests="true"

tests/Unit/OpenTelemetry/Exporter/OtlpExporterOptionsTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
use PHPUnit\Framework\TestCase;
1313

1414
/**
15-
* @coversDefaultClass \FriendsOfOpenTelemetry\OpenTelemetryBundle\OpenTelemetry\Exporter\OtlpExporterOptions
16-
*
1715
* @phpstan-import-type ExporterOptions from ExporterOptionsInterface
1816
*/
1917
#[CoversClass(OtlpExporterOptions::class)]

tests/Unit/OpenTelemetry/Trace/SpanProcessor/NoopSpanProcessorFactoryTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
use PHPUnit\Framework\Attributes\CoversClass;
77
use PHPUnit\Framework\TestCase;
88

9-
/**
10-
* @coversDefaultClass \FriendsOfOpenTelemetry\OpenTelemetryBundle\OpenTelemetry\Trace\SpanProcessor\NoopSpanProcessorFactory
11-
*/
129
#[CoversClass(NoopSpanProcessorFactory::class)]
1310
class NoopSpanProcessorFactoryTest extends TestCase
1411
{

tests/Unit/OpenTelemetry/Trace/SpanProcessor/SimpleSpanProcessorFactoryTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
use PHPUnit\Framework\Attributes\CoversClass;
1111
use PHPUnit\Framework\TestCase;
1212

13-
/**
14-
* @coversDefaultClass \FriendsOfOpenTelemetry\OpenTelemetryBundle\OpenTelemetry\Trace\SpanProcessor\SimpleSpanProcessorFactory
15-
*/
1613
#[CoversClass(SimpleSpanProcessorFactory::class)]
1714
class SimpleSpanProcessorFactoryTest extends TestCase
1815
{

0 commit comments

Comments
 (0)