Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rslee1247's avatar

Getting PHP error only when running `sail artisan`

I'm getting the following error only when running artisan through my sail instance.

Required parameter $closure follows optional parameter $date

When I just run php artisan without going through sail or when I visit through the browser, there's no error. Is this something I should bring up with the package creator or possibly something I can fix on my end.

0 likes
1 reply
PaulMaxOS's avatar

Well, does the method that is throwing the error belong to your application code or is it coming from the framework?

If it’s in your application code you could just switch the order of arguments of that method, which would also make more sense - at least to me: you wouldn’t have to pass null as arg only to pass the required arg if you don’t have a date

Please or to participate in this conversation.