Skip to content

Commit 04ba5c9

Browse files
authored
PHP 8.1 compatibility (#489)
* Add PHP 8.1 to test matrix * Fix composer package versions * Set the php-cs-fixer version to 'dev-master' * Reset the php-cs-fixer version to stable one * Set friendsofphp/php-cs-fixer version to 3.4 * Fix PHPStan covariant error in PHP8.1 * Fix optional parameter declared before required parameter error * fix the matrix * more matrix fixing
1 parent 597a811 commit 04ba5c9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"assertwell/phpunit-global-state": "^0.2",
5656
"composer/xdebug-handler": "^2.0",
5757
"dg/bypass-finals": "^1.3",
58-
"friendsofphp/php-cs-fixer": "^3.0",
58+
"friendsofphp/php-cs-fixer": "^3.4",
5959
"guzzlehttp/guzzle": "^7.4",
6060
"guzzlehttp/psr7": "^2.1",
6161
"mikey179/vfsstream": "^1.6",

tests/Context/Unit/Propagation/ArrayAccessGetterSetterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ public function offsetGet($offset)
8484
{
8585
}
8686

87-
public function offsetSet($offset, $value)
87+
public function offsetSet($offset, $value): void
8888
{
8989
}
9090

91-
public function offsetUnset($offset)
91+
public function offsetUnset($offset): void
9292
{
9393
}
9494

tests/SDK/Integration/ParentBasedTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testParentBased(
3737
?SamplerInterface $remoteParentNotSampled = null,
3838
?SamplerInterface $localParentSampled = null,
3939
?SamplerInterface $localParentNotSampled = null,
40-
$expectedDdecision
40+
?int $expectedDecision = null
4141
): void {
4242
$rootSampler = $this->createMockSamplerNeverInvoked();
4343

@@ -48,7 +48,7 @@ public function testParentBased(
4848
'test.opentelemetry.io',
4949
API\SpanKind::KIND_INTERNAL
5050
);
51-
$this->assertEquals($expectedDdecision, $decision->getDecision());
51+
$this->assertEquals($expectedDecision, $decision->getDecision());
5252
}
5353

5454
public function parentContextData(): array

0 commit comments

Comments
 (0)