Skip to content

Conversation

@rodrigopedra
Copy link
Contributor

This PR

  • Tidies up the queue parsing logic within the Illuminate\Queue\Console\Concerns\ParsesQueue@parseQueue method
    • If a negative length is given to array_pad, then the array is padded to the left, and as such the queue value always ends up on the $queue variable.
    • By defaulting $connection to null, we can remove the ternary operator from the return statement and use the null coalescing operator to replace a missing value with its default value, without context swapping the $connection and $queue variables.
  • Adds test cases to ensure parsing happens as expected.

I also defaulted $queue to the default queue when an empty string is given, but I can revert that if wanted.

@rodrigopedra
Copy link
Contributor Author

Failing tests are unrelated to the changes proposed in this PR.

@taylorotwell taylorotwell merged commit 6df4e2a into laravel:12.x Nov 24, 2025
57 of 76 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.

2 participants