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

davorminchorov's avatar

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

Hello,

When I run composer update to install the laracasts/flash package, I get this error:

[Symphony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::getCacheCompiledPath()

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

[RuntimeException]

I've already deleted vendor/compiled.php but it didn't change anything.

0 likes
11 replies
mstnorris's avatar

In some cases you have to also delete the storage/framework/compiled.php too to make it work

davorminchorov's avatar

I started a new project to test something and I had the same problem. I ran the command manually and everything worked, but in my current project it fails and it returns the same error. I checked the storage/framework folder and it doesn't have any compiled.php file there.

mpmurph's avatar

@Ruffles - Did you by any chance ever figure out the problem with the 'current project' you mention above vis a vis installing laracasts/flash? I'm trying to install it right now myself and am also getting an error connected to the 'scripts' in composer.json:

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
                      
  [RuntimeException]  
  Error Output:       
                      
2 likes
davorminchorov's avatar

I fixed that issue a few times after that but I don't remember what was the problem. Delete the compiled.php file inside the vendor folder and do a php artisan clear-compiled. See if that works.

olimorris's avatar

I can confirm that I was having the same error and I just cleared the /storage/framework/cache files and it worked just fine afterwards.

goejaza's avatar

you can clear remove package form cache on path bootstrap/cache/config

slee1005's avatar

I had same issue while I upgrade to 5.4. delete /bootsrap/cache/script.json and /bootstrap/cache/compiled.php

add BROADCAST_DRIVER=log in .env

run Composer update

hope it helps

Please or to participate in this conversation.