Skip to content

[main] [bug] Guard against empty token list in auth:token --remove#134

Merged
joetannenbaum merged 2 commits intolaravel:mainfrom
JoshSalway:fix/auth-token-empty-guard
Apr 10, 2026
Merged

[main] [bug] Guard against empty token list in auth:token --remove#134
joetannenbaum merged 2 commits intolaravel:mainfrom
JoshSalway:fix/auth-token-empty-guard

Conversation

@JoshSalway
Copy link
Copy Markdown
Contributor

@JoshSalway JoshSalway commented Apr 6, 2026

Summary

auth:token --remove calls select() with no options when no tokens exist, which crashes. Added an early return with a warning message and CommandExitException(self::FAILURE), matching the same pattern used in listTokens() for empty state.

Closes #86

Test plan

  • ./vendor/bin/pest - 33 tests pass (before and after, no regressions)
  • ./vendor/bin/pint --test - no style issues

Josh Salway and others added 2 commits April 6, 2026 22:46
select() crashes when called with empty options. Added early return
with a warning message when no tokens exist.

Closes laravel#86

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@joetannenbaum joetannenbaum merged commit 5dd0de4 into laravel:main Apr 10, 2026
2 checks passed
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.

Bug: AuthToken --remove with no tokens calls select() with empty options

2 participants