Skip to content

fix: apply base_uri via withOptions() when custom client is injected - #16

Closed
lepresk wants to merge 1 commit into
mainfrom
fix/use-client-base-uri
Closed

fix: apply base_uri via withOptions() when custom client is injected#16
lepresk wants to merge 1 commit into
mainfrom
fix/use-client-base-uri

Conversation

@lepresk

@lepresk lepresk commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fixes useClient() bypasses base_uri setup, causing relative URL failures #10
  • When useClient() was called before collection(), disbursement(), or create(), the base_uri setup block was skipped entirely (guarded by self::$client === null), causing Symfony to throw Invalid URL: scheme is missing on relative paths.
  • Added an else branch in all three methods that calls withOptions(['base_uri' => ...]) on the existing client.

Test plan

🤖 Generated with Claude Code

When useClient() was called before collection(), disbursement(), or create(),
the base_uri setup was skipped entirely, causing Symfony to throw
"Invalid URL: scheme is missing" on relative paths.

Closes #10

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lepresk lepresk closed this Apr 22, 2026
@lepresk
lepresk deleted the fix/use-client-base-uri branch April 22, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useClient() bypasses base_uri setup, causing relative URL failures

1 participant