Skip to content

Commit

Permalink
Merge branch 'master' into 3.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/cache/tests/Cases/StringHelperTest.php
#	src/command/src/Command.php
  • Loading branch information
limingxinleo committed Aug 9, 2023
2 parents 33ad049 + d2848d8 commit 944ed1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Aspect/HttpClientAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class HttpClientAspect extends AbstractAspect
use SpanStarter;

public array $classes = [
Client::class . '::request',
Client::class . '::requestAsync',
];

Expand All @@ -47,6 +48,10 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint)
if (isset($options['no_aspect']) && $options['no_aspect'] === true) {
return $proceedingJoinPoint->process();
}
// Disable the aspect for the requestAsync method.
if ($proceedingJoinPoint->methodName == 'request') {
$proceedingJoinPoint->arguments['keys']['options']['no_aspect'] = true;
}
$arguments = $proceedingJoinPoint->arguments;
$method = $arguments['keys']['method'] ?? 'Null';
$uri = $arguments['keys']['uri'] ?? 'Null';
Expand Down

0 comments on commit 944ed1c

Please sign in to comment.