EDIT: I'm an not looking for advice on whether I should do what this question asks, but on how to do it. Also, I don't just want to suppress warnings - as far as I can tell the warning is interpreted as an error and prevents further execution. I want to both suppress the error notice and not have it prevent further execution.
I thought deprecated meant you could still use it, but my Laravel app breaks with [ErrorException] The each() function is deprecated. This message will be suppressed on further calls
I have tried this solution:
Laravel breaks entire app on PHP notices
i.e. putting error_reporting(0)
in \app\Providers\AppServiceProvider.php
boot()
method, but no joy.
Is it possible to suppress this error, or are my only options to use a lower version of PHP or refactor the code?