WouterJEloquentBundle
WouterJEloquentBundle copied to clipboard
eloquent:migrate:fresh command fail without --database parameter
Hello,
Version: 2.2.1
Using the command bin/console eloquent:migrate:fresh
without any paramter leads to an error whereas the help output says we can use it without any parameter: eloquent:migrate:fresh [--database DATABASE] [--force] [--path PATH] [--seed] [--seeder SEEDER]
$ bin/console eloquent:migrate:fresh
[critical] Error thrown while running command "eloquent:migrate:fresh". Message: "WouterJ\EloquentBundle\Command\MigrateFreshCommand::dropAllTables(): Argument #1 ($database) must be of type string, null given, called in /Volumes/Projects/customers-service/vendor/wouterj/eloquent-bundle/src/Command/MigrateFreshCommand.php on line 58"
In MigrateFreshCommand.php line 79:
WouterJ\EloquentBundle\Command\MigrateFreshCommand::dropAllTables(): Argument #1 ($database) must be of type string, null given, called in /Volumes/Projects/customers-service/vendor/wouterj/eloquent-bundle/src/Command/MigrateFresh
Command.php on line 58
eloquent:migrate:fresh [--database DATABASE] [--force] [--path PATH] [--seed] [--seeder SEEDER]
If you provide the --database default
parameter it throw another error saying that --path
is required.
The workaround is to force the --database DATABASE
AND --path PATH
paramters but I think both should be optional.
Thanks