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

numberone's avatar

L5 php artisan gives error

when i run this:

php artisan make:migration create_topics_table --create="topics"

I am getting :

Created Migration: 2014_12_07_201554_create_topics_table exception 'InvalidArgumentException' with message 'Command "dump-autoload" is not defined.' in /Users/.../vendor/symfony/console/Symfony/Component/Console/Application.php:549

I have no problem with L4. any idea ?

0 likes
9 replies
bestmomo's avatar

Hi,

The same here... looking deeper to find what happens... Has something with last workbench updates...

MThomas's avatar
MThomas
Best Answer
Level 35

Might be an idea to use an older version in composer.json for the time being?

this one might work:

"laravel/framework": "dev-master#846c935194a036901ba6b4397c8897fa51e19111",
2 likes
bestmomo's avatar

The migration works, just dump-autoload call that fails. So it's ok.

MThomas's avatar

When I run php artisan dump-autoload manually on a copy based on the commit indicated above it works fine.

Why not give it a try, or did I get you wrong and did you already tried it?

MThomas's avatar

When i create a migration or seeder manually :)

Good to see that this fixed it for you :)

bashantad's avatar

[InvalidArgumentException]
Command "dump-autoload" is not defined.

phylaxis's avatar

I'm getting the same error as bashantad:

[InvalidArgumentException] Command "dump-autoload" is not defined.

Please or to participate in this conversation.