diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index ad3362944..dcd49a8c6 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -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 @@ -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 }} @@ -78,7 +78,7 @@ 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') }} @@ -86,7 +86,7 @@ jobs: ${{ 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') }} diff --git a/src/Extension/Propagator/B3/B3MultiPropagator.php b/src/Extension/Propagator/B3/B3MultiPropagator.php index 7c5211261..5d4afbed9 100644 --- a/src/Extension/Propagator/B3/B3MultiPropagator.php +++ b/src/Extension/Propagator/B3/B3MultiPropagator.php @@ -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(); @@ -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(); diff --git a/src/Extension/Propagator/B3/B3Propagator.php b/src/Extension/Propagator/B3/B3Propagator.php index 1c91c6145..0d8c720dc 100644 --- a/src/Extension/Propagator/B3/B3Propagator.php +++ b/src/Extension/Propagator/B3/B3Propagator.php @@ -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(); diff --git a/src/Extension/Propagator/B3/B3SinglePropagator.php b/src/Extension/Propagator/B3/B3SinglePropagator.php index 56160ff1a..7b9ab1ed0 100644 --- a/src/Extension/Propagator/B3/B3SinglePropagator.php +++ b/src/Extension/Propagator/B3/B3SinglePropagator.php @@ -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(); @@ -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(); diff --git a/src/Extension/Propagator/CloudTrace/CloudTracePropagator.php b/src/Extension/Propagator/CloudTrace/CloudTracePropagator.php index 5e2cf7787..7a53e3f12 100644 --- a/src/Extension/Propagator/CloudTrace/CloudTracePropagator.php +++ b/src/Extension/Propagator/CloudTrace/CloudTracePropagator.php @@ -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; @@ -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(); diff --git a/src/Extension/Propagator/Jaeger/JaegerBaggagePropagator.php b/src/Extension/Propagator/Jaeger/JaegerBaggagePropagator.php index a7a2b6c9b..dd53b2238 100644 --- a/src/Extension/Propagator/Jaeger/JaegerBaggagePropagator.php +++ b/src/Extension/Propagator/Jaeger/JaegerBaggagePropagator.php @@ -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(); @@ -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(); diff --git a/src/Extension/Propagator/Jaeger/JaegerPropagator.php b/src/Extension/Propagator/Jaeger/JaegerPropagator.php index 3064c57e8..31cdcd576 100644 --- a/src/Extension/Propagator/Jaeger/JaegerPropagator.php +++ b/src/Extension/Propagator/Jaeger/JaegerPropagator.php @@ -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(); @@ -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();