Skip to content

Commit

Permalink
feat: Cast uri to string in GuzzleHttpClientAspect (#640)
Browse files Browse the repository at this point in the history
Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
huangdijia and huangdijia committed May 23, 2024
1 parent ae3c7f4 commit 7050b3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Aspect/GuzzleHttpClientAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint)
$proceedingJoinPoint->arguments['keys']['options']['no_sentry_aspect'] = true;
}

$uri = $arguments['keys']['uri'] ?? '';
$uri = (string) ($arguments['keys']['uri'] ?? '');
$data['config'] = $guzzleConfig;
$data['request']['method'] = $arguments['keys']['method'] ?? 'GET';
$data['request']['options'] = $arguments['keys']['options'] ?? [];
Expand Down
3 changes: 1 addition & 2 deletions src/Tracing/Aspect/GuzzleHttpClientAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint)
$proceedingJoinPoint->arguments['keys']['options']['no_sentry_tracing'] = true;
}

$uri = $arguments['uri'] ?? '/';
$uri = (string) ($arguments['uri'] ?? '/');
$method = $arguments['method'] ?? 'GET';

$fullUri = new \GuzzleHttp\Psr7\Uri($uri);

$data = [
Expand Down

0 comments on commit 7050b3c

Please sign in to comment.