Skip to content

Commit

Permalink
Optimized phpdoc for @deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia committed Oct 24, 2024
1 parent 6f007c3 commit 25ca9dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/Tracing/Aspect/GuzzleHttpClientAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/Aspect/RpcAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/TagManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 25ca9dd

Please sign in to comment.