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

somnathsah's avatar

Composer update and composer dump-autoload issue

Hi Everyone,

I am trying to rebuild psr4 autoload but whenever I am running commands composer update or composer dump-autoload it works correctly. After running this any of php artisan command does not works.

For example if I run command after composer update or composer dump-autoload.

php artisan config:clear

It does nothing and console prompt appear again without doing anything.

Thanks, Somnath

0 likes
4 replies
jlrdw's avatar

Have you tried deleting vendor (backup first) and then do a composer update.

somnathsah's avatar

Changed vendor folder name and tried running composer update and composer dump-autoload same issue comes.

somnathsah's avatar

Now I am able find the cause of this issue, We need to run "php artisan optimize" after running composer update or composer dump-autoload.

Please or to participate in this conversation.