Laravel-modules: module:migrate-refresh throws error when no option is provided.

Created on 4 Mar 2020  Â·  3Comments  Â·  Source: nWidart/laravel-modules

From the docs:
module:migrate-refresh
Refresh the migration for the given module, or without a specified module refresh all modules migrations.

• When running the command without the module name it throws "TypeError: Argument 1 passed to Nwidart\Modules\FileRepository::find() must be of the type string, null given" when it should refresh all the modules.
• FileRepository::find(string $name) accepts string typed parameter, so we cannot pass null values and an error is thrown.
• Inside MigrateRefreshCommand::getModuleName() checking for null module before calling the FileRepository::find() or making FileRepository::find() accept Nullable parameter seems to solve the problem.

bug

Most helpful comment

Thank you for reporting the issue, I'll take a look at it.

All 3 comments

Thank you for reporting the issue, I'll take a look at it.

I got the same error here.

Laravel: v7.4.0
laravel-modules: 7.0.0

I'm having the same problem. Have there been any developments?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexandretaz picture alexandretaz  Â·  3Comments

invaders-xx picture invaders-xx  Â·  3Comments

developh picture developh  Â·  3Comments

dagulo picture dagulo  Â·  3Comments

vdjkelly picture vdjkelly  Â·  4Comments