-
-
Notifications
You must be signed in to change notification settings - Fork 376
Conversation
It would be a breaking change if In my opinion this should be changed like this:
|
@tobiasdalhof - I agree - that's a great idea. Will try to make it. |
@tobiasdalhof - actually - even if the parameter is only 1 job and not an array, it is still a php array. Any idea how can this be checked? |
Something like this comes to my mind $afterAuthJobConfig = config('shopify-app.after_authenticate_job');
if (!empty($afterAuthJobConfig['job'])) {
// Run job
return;
}
foreach ($afterAuthJobConfig as $job) {
// Run job
} |
@tobiasdalhof Great idea, I added a similar solution. |
The failed travis test is is now not necessary as the jobs are now installed with a foreach loop, which will not run if there are no jobs to run. |
Thanks for this. Will review after my flights but from the phone looks all good :) the failed test, wifi here is bad, but it's probably the billing controller. There's a test in there which I haven't figured out how to solve, it fails only sometimes due to an order of operations thing, usually restart of the Travis test makes it pass. Either way I'll check it out! |
Thanks! Happy to help with this great project! This is the failed test: And it's ok that it is failing because indeed now the afterauth method does not return false if the parameter is empty, and that is because it runs in a foreach loop which will simply not run if the array is empty. Thanks again! |
Looks fine to me. Will merge in and kill that test and should be fine since its a loop anyways. |
No description provided.