Skip to content

Commit

Permalink
fixing implicit nullable deprecations, bump GH actions (#1340)
Browse files Browse the repository at this point in the history
* implicit nullable parameters are deprecated in 8.4, so make them explicit
* update github actions versions
  • Loading branch information
brettmc authored Jun 28, 2024
1 parent b6f9afb commit 36f29a3
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
echo "key=$(date +'%Y-%U')" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: gacts/run-and-post-run@v1
id: post-run-command
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
Expand All @@ -78,15 +78,15 @@ jobs:

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-${{ matrix.php-version }}-php-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-php-
- name: Cache test tools
id: test-tools-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor-bin
key: ${{ runner.os }}-${{ matrix.php-version }}-php-${{ hashFiles('**/composer.json') }}
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/Propagator/B3/B3MultiPropagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function fields(): array
}

/** {@inheritdoc} */
public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
public function inject(&$carrier, ?PropagationSetterInterface $setter = null, ?ContextInterface $context = null): void
{
$setter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand All @@ -125,7 +125,7 @@ public function inject(&$carrier, PropagationSetterInterface $setter = null, Con
}
}

public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
public function extract($carrier, ?PropagationGetterInterface $getter = null, ?ContextInterface $context = null): ContextInterface
{
$getter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/Propagator/B3/B3Propagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public function fields(): array
}

/** {@inheritdoc} */
public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
public function inject(&$carrier, ?PropagationSetterInterface $setter = null, ?ContextInterface $context = null): void
{
$this->propagator->inject($carrier, $setter, $context);
}

/** {@inheritdoc} */
public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
public function extract($carrier, ?PropagationGetterInterface $getter = null, ?ContextInterface $context = null): ContextInterface
{
$getter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/Propagator/B3/B3SinglePropagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function fields(): array
}

/** {@inheritdoc} */
public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
public function inject(&$carrier, ?PropagationSetterInterface $setter = null, ?ContextInterface $context = null): void
{
$setter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand All @@ -78,7 +78,7 @@ public function inject(&$carrier, PropagationSetterInterface $setter = null, Con
}

/** {@inheritdoc} */
public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
public function extract($carrier, ?PropagationGetterInterface $getter = null, ?ContextInterface $context = null): ContextInterface
{
$getter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/Propagator/CloudTrace/CloudTracePropagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function fields(): array
}

/** {@inheritdoc} */
public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
public function inject(&$carrier, ?PropagationSetterInterface $setter = null, ?ContextInterface $context = null): void
{
if ($this->oneWay) {
return;
Expand All @@ -76,7 +76,7 @@ public function inject(&$carrier, PropagationSetterInterface $setter = null, Con
}

/** {@inheritdoc} */
public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
public function extract($carrier, ?PropagationGetterInterface $getter = null, ?ContextInterface $context = null): ContextInterface
{
$getter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/Propagator/Jaeger/JaegerBaggagePropagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function fields(): array
}

/** {@inheritdoc} */
public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
public function inject(&$carrier, ?PropagationSetterInterface $setter = null, ?ContextInterface $context = null): void
{
$setter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand All @@ -59,7 +59,7 @@ public function inject(&$carrier, PropagationSetterInterface $setter = null, Con
}

/** {@inheritdoc} */
public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
public function extract($carrier, ?PropagationGetterInterface $getter = null, ?ContextInterface $context = null): ContextInterface
{
$getter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/Propagator/Jaeger/JaegerPropagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function fields(): array
}

/** {@inheritdoc} */
public function inject(&$carrier, PropagationSetterInterface $setter = null, ContextInterface $context = null): void
public function inject(&$carrier, ?PropagationSetterInterface $setter = null, ?ContextInterface $context = null): void
{
$setter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand All @@ -75,7 +75,7 @@ public function inject(&$carrier, PropagationSetterInterface $setter = null, Con
}

/** {@inheritdoc} */
public function extract($carrier, PropagationGetterInterface $getter = null, ContextInterface $context = null): ContextInterface
public function extract($carrier, ?PropagationGetterInterface $getter = null, ?ContextInterface $context = null): ContextInterface
{
$getter ??= ArrayAccessGetterSetter::getInstance();
$context ??= Context::getCurrent();
Expand Down

0 comments on commit 36f29a3

Please sign in to comment.