Repository navigation
fix: base_url defaults to the API and ignores a trailing /v1 - #1
Merged
Merged
Conversation
The API reference prints https://api.proofage.net/v1, and an integration that passed it as base_url called /v1/v1/... and got 404 on every request: the client appends the version itself. Production showed coding agents giving up on the SDK at that point and writing their own Guzzle client. A trailing /{version} is now dropped (a proxy prefix before it is kept), and base_url defaults to https://api.proofage.net, as in the Node.js and Python SDKs. An explicitly empty base_url is still an error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://api.proofage.net/v1is the address the API reference and the OpenAPIserversentry print. Passed asbase_url, it made every call go to/v1/v1/...and fail with 404, because the client appends the version itself. On production, coding agents integrating PHP and Laravel apps gave up on the SDK at that point and wrote their own Guzzle client./{version}onbase_urlis dropped; a path prefix before it (a proxy) is kept.base_urldefaults tohttps://api.proofage.net(also whennull), as in the Node.js and Python SDKs. An explicit empty string is still a configuration error.Locally: 538 tests, PHPStan and Pint pass. No release yet: the tag comes after review.
🤖 Generated with Claude Code