You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Queue::bulk() method does not work with an Illuminate\Support\Collection as first argument. In bulk(), the first argument is cast to an array but the Collection behaves in an unexpected way here:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The
Queue::bulk()
method does not work with anIlluminate\Support\Collection
as first argument. Inbulk()
, the first argument is cast to anarray
but theCollection
behaves in an unexpected way here:Jobs that are created with a
$collection->map()
, for example, will fail with a cryptic error.I propose to implement explicit support for
Collection
inQueue::bulk()
.Also, the
QueueFake
does not cast the first argument to anarray
, which makes the above issue hard to detect in tests.I propose to implement array casting (and support for
Collection
) in theQueueFake
to make this behavior consistent. What do you think?Beta Was this translation helpful? Give feedback.
All reactions