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

wowrudy's avatar

php artisan not working after composer update

Hi, i got same problem like this

https://laracasts.com/discuss/channels/general-discussion/runtimeexception-on-fresh-install/?page=1

i cannot run php artisan command, it show nothing

and if i do composer update i got this error

Script php artisan clear-compiled handling the post-update-cmd event returned with an error                      

i dont have any file on my project :

vendor/compiled.php
storage/framework/compiled.php

or

bootstrap/compiled.php
0 likes
6 replies
SaeedPrez's avatar
Level 50

See if any of these solutions work for you..

Solution 1

Removed the bootstrap/cache/config.php file.

composer dumpautoload
composer update.

source

Solution 2

Move php artisan clear-compiled from "pre-update-cmd" to the "post-update-cmd" in your composer.json file

"post-update-cmd": [
  "php artisan clear-compiled",
  "php artisan optimize"
]

source

Solution 3

php artisan optimize --force

source

GuntarV's avatar

Similar problem here. After I installed Laravel 5.5, everything worked fine, till I created as command with "php artisan make command: myCommand". After that every time I run (for example: php artisan list) I will get this error: In Client.php line 122: Invalid argument supplied for foreach() At the moment I am stuck, any help would be greatly appreciated.

Snapey's avatar

@guntar

back out your changes, and raise your own question if you need help

Please or to participate in this conversation.