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
To me, this makes the library a little harder to use for certain cases. Specifically, if you want to query a changing list of queues, you seem to have to call getJob() using call_user_func_array. Unless there's another usage you suggest?
The text was updated successfully, but these errors were encountered:
The splat operator ("argument unpacking") is helpful. The only remaining annoyance is the $options array, because you can't use positional arguments after argument unpacking. So, I end up doing something like:
@kaecyra I don't have any strong preference towards variadics, I just enjoy writing getJob('q1', 'q2'). I do see how it's annoying when dealing with a dynamic list of queues.
As @dominics suggested this can be simplified using unpacking, and i'd add that you can actually get around the $options issue with a one liner:
getJob(...array_merge($queues, [$options]));
Would you agree that's an acceptable workaround to avoid an API change, or do you feel you have use cases where something else needs to be offered?
To me, this makes the library a little harder to use for certain cases. Specifically, if you want to query a changing list of queues, you seem to have to call getJob() using call_user_func_array. Unless there's another usage you suggest?
The text was updated successfully, but these errors were encountered: