diff --git a/src/Tracing/Aspect/GuzzleHttpClientAspect.php b/src/Tracing/Aspect/GuzzleHttpClientAspect.php index 93007ed..3bcf0d9 100644 --- a/src/Tracing/Aspect/GuzzleHttpClientAspect.php +++ b/src/Tracing/Aspect/GuzzleHttpClientAspect.php @@ -55,12 +55,10 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint) $instance = $proceedingJoinPoint->getInstance(); $arguments = $proceedingJoinPoint->arguments['keys']; $options = $arguments['options'] ?? []; - $guzzleConfig = (function () { - if (method_exists($this, 'getConfig')) { // @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. - return $this->getConfig(); - } - - return $this->config ?? []; + $guzzleConfig = (fn () => match (true) { + method_exists($this, 'getConfig') => $this->getConfig(), // @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. + property_exists($this, 'config') => $this->config, + default => [], })->call($instance); if ( diff --git a/src/Tracing/Aspect/RpcAspect.php b/src/Tracing/Aspect/RpcAspect.php index edf2627..0b894d8 100644 --- a/src/Tracing/Aspect/RpcAspect.php +++ b/src/Tracing/Aspect/RpcAspect.php @@ -95,7 +95,7 @@ private function handleGenerateRpcPath(ProceedingJoinPoint $proceedingJoinPoint) 'rpc.service' => $service, ]; - Context::set(static::DATA, $data); // will be removed in v3.2 + Context::set(static::DATA, $data); // @deprecated since v3.1, will be removed in v3.2 Context::set(static::SPAN, $span->setData($data)); if ($this->container->has(Rpc\Context::class)) { diff --git a/src/Tracing/TagManager.php b/src/Tracing/TagManager.php index 610fa81..6a44ee8 100644 --- a/src/Tracing/TagManager.php +++ b/src/Tracing/TagManager.php @@ -14,7 +14,7 @@ use Hyperf\Contract\ConfigInterface; /** - * @deprecated since v3.1, will remove in v3.2 + * @deprecated since v3.1, will be removed in v3.2 */ class TagManager {