Level 102
Which ServiceProvider file is that? Can you see what is on that line?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Why I got this error after run 'php artisan clear' and how to debug?
$ php artisan clear
> In ServiceProvider.php line 72:
array_merge(): Expected parameter 2 to be an array, int given
Also, same error when I install something:
$ composer require something
> In ServiceProvider.php line 72:
array_merge(): Expected parameter 2 to be an array, int given
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Tried composer update, didn't help, same error as well.
BTW I'm using PHP 7.4 with Laravel 5.8
Update:
I just delete all the file in the bootstrap/cache and rerun the command and it worked.
Please or to participate in this conversation.