Skip to content

[13.x] default clear() queue driver param to null#60192

Merged
taylorotwell merged 1 commit into
laravel:13.xfrom
jackbayliss:13.x-default-clear-to-null
May 20, 2026
Merged

[13.x] default clear() queue driver param to null#60192
taylorotwell merged 1 commit into
laravel:13.xfrom
jackbayliss:13.x-default-clear-to-null

Conversation

@jackbayliss
Copy link
Copy Markdown
Contributor

@jackbayliss jackbayliss commented May 19, 2026

Tried to do this locally after tinkering & testing and got an error:

> Queue::clear();                                                                                                                             

   ArgumentCountError  Too few arguments to function Illuminate\Queue\DatabaseQueue::clear(), 0 passed in vendor\laravel\framework\src\Illuminate\Queue\QueueManager.php on line 407 and exactly 1 expected.****

If we default it to null, it'll use the default queue so no error.

This makes it the same as pop(), push(), size(), and every other method on the queue drivers already.

No B/C.. as it's just allowing null.

I was going to add this to all the drivers no op ie Sync etc, so its on the Facade as I think it would be useful, but not sure if you fancy that 😄 ... if you want that lmk, I'll do it!

@github-actions
Copy link
Copy Markdown

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.

@jackbayliss jackbayliss marked this pull request as ready for review May 19, 2026 23:17
@taylorotwell taylorotwell merged commit 5ac671b into laravel:13.x May 20, 2026
54 checks passed
@jackbayliss jackbayliss deleted the 13.x-default-clear-to-null branch May 20, 2026 12:41
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