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

nckhtt's avatar

Extending MigrateCommand

I'm trying to extend MigrateCommand (Illuminate\Database\Console\Migrations\MigrateCommand), but I am getting this error:

[Illuminate\Container\BindingResolutionException] Target [Illuminate\Database\Migrations\MigrationRepositoryInterf ace] is not instantiable.

My class is literally empty {}. Shouldn't the MigrationRepositoryInterface already be bound to the injected Migrator in \Illuminate\Database\MigrationServiceProvider ?

0 likes
1 reply
aedart's avatar

When you extended the given command, did you also create a custom service provider for it?

Please or to participate in this conversation.