Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MigrateMakeCommand::writeMigration() called with erroneous $create argument #13409

Closed
vlakoff opened this issue May 3, 2016 · 2 comments
Closed

Comments

@vlakoff
Copy link
Contributor

vlakoff commented May 3, 2016

Database\Console\Migrations\MigrateMakeCommand::writeMigration($name, $table, $create) is sometimes called with $create equals null, whereas it should be false. This might lead to future bugs and ideally should be fixed.

This isn't caught by the tests, also because of the loose typing. If you look for example at DatabaseMigrationMakeCommandTest::testBasicCreateDumpsAutoload, line 23:

$creator->shouldReceive('create')->once()->with('create_foo', __DIR__.'/migrations', null, false);

but in fact it receives (<path>, null, NULL).


The bug is because in Database\Console\Migrations\MigrateMakeCommand::fire, line 70 gives NULL:

$create = $this->input->getOption('create');
@billmn
Copy link
Contributor

billmn commented Jun 3, 2016

@vlakoff This issue can be closed?

@vlakoff
Copy link
Contributor Author

vlakoff commented Jun 3, 2016

Yep, has been fixed by #13439 and no issues remaining if I recall correctly. Thanks for pointing out.

@vlakoff vlakoff closed this as completed Jun 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants