Skip to content

Fix hardcoded URLs for private Cloud compatibility#95

Draft
JoshSalway wants to merge 4 commits intolaravel:mainfrom
JoshSalway:fix/private-cloud-compatibility
Draft

Fix hardcoded URLs for private Cloud compatibility#95
JoshSalway wants to merge 4 commits intolaravel:mainfrom
JoshSalway:fix/private-cloud-compatibility

Conversation

@JoshSalway
Copy link

Summary

  • Replace two hardcoded https://cloud.laravel.com URLs with config('app.base_url') so the "Learn how to create an API token" links resolve correctly when CLOUD_BASE_URL is set to a private instance
  • Add a "Private Cloud / Custom Base URL" section to the README documenting the CLOUD_BASE_URL env var

Refs #93

Status: DRAFT — needs guidance from maintainers

Question: Is Private Cloud a supported use case for the CLI?

  • If yes: these changes fix the hardcoded URLs and document the workflow. The existing CLOUD_BASE_URL env var, per-instance config file storage, and API base URL resolution already work — these two info messages were the only places still hardcoded.
  • If no: the README section should be updated to say "not supported" instead, and these URL fixes are still arguably correct (they respect the existing config).

What we cannot verify

The browser-based OAuth flow (cloud auth) needs testing against a private instance — we have no way to confirm it works end-to-end. The cloud auth:token manual token path should work fine since it only hits the API via the already-configurable base URL.

Changes

File Change
app/Commands/AuthToken.php Replace hardcoded URL with config('app.base_url')
app/Concerns/HasAClient.php Replace hardcoded URL with config('app.base_url')
README.md Add "Private Cloud / Custom Base URL" section

Test plan

  • ./vendor/bin/phpstan analyse passes with no errors
  • Verify cloud auth:token shows correct URL when CLOUD_BASE_URL is set
  • Verify cloud auth:token shows default URL when CLOUD_BASE_URL is not set
  • Test OAuth flow with a private instance (requires private Cloud setup)

🤖 Generated with Claude Code

Josh Salway and others added 4 commits March 17, 2026 05:27
laravel#38: The code path in BaseCommand::runUpdate() is reachable when CLI
flags are passed in interactive mode and the user confirms. Removed
the misleading "When would we ever get here?" comment.

laravel#39: Added --dry-run flag to both deploy and ship commands. Shows what
would happen (app, environment, branch, region, database type) without
executing any API calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ntVariables

Replace info($url) with a neutral message to prevent plaintext database
credentials from being displayed in terminal output. Remove ~28 lines of
commented-out code from EnvironmentVariables.

Closes laravel#83
Closes laravel#84

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use self::FAILURE instead of integer 1 in InstanceDelete catch block
  for consistency with other delete commands (closes laravel#85)
- Add early return in removeToken() when no tokens exist to prevent
  calling select() with empty options (closes laravel#86)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…for private Cloud compatibility

Fixes two hardcoded documentation URLs in AuthToken and HasAClient that
break when CLOUD_BASE_URL is set to a private instance. Adds a README
section documenting the CLOUD_BASE_URL env var and private Cloud usage.

Refs laravel#93

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

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.

1 participant