Skip to content

Commit

Permalink
PHP 8.1 compatibility (#489)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
tidal authored Dec 16, 2021
1 parent 597a811 commit 04ba5c9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"assertwell/phpunit-global-state": "^0.2",
"composer/xdebug-handler": "^2.0",
"dg/bypass-finals": "^1.3",
"friendsofphp/php-cs-fixer": "^3.0",
"friendsofphp/php-cs-fixer": "^3.4",
"guzzlehttp/guzzle": "^7.4",
"guzzlehttp/psr7": "^2.1",
"mikey179/vfsstream": "^1.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ public function offsetGet($offset)
{
}

public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
}

public function offsetUnset($offset)
public function offsetUnset($offset): void
{
}

Expand Down
4 changes: 2 additions & 2 deletions tests/SDK/Integration/ParentBasedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testParentBased(
?SamplerInterface $remoteParentNotSampled = null,
?SamplerInterface $localParentSampled = null,
?SamplerInterface $localParentNotSampled = null,
$expectedDdecision
?int $expectedDecision = null
): void {
$rootSampler = $this->createMockSamplerNeverInvoked();

Expand All @@ -48,7 +48,7 @@ public function testParentBased(
'test.opentelemetry.io',
API\SpanKind::KIND_INTERNAL
);
$this->assertEquals($expectedDdecision, $decision->getDecision());
$this->assertEquals($expectedDecision, $decision->getDecision());
}

public function parentContextData(): array
Expand Down

0 comments on commit 04ba5c9

Please sign in to comment.