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

[5.7] Fix broken db command code #27020

Merged
merged 1 commit into from Jan 1, 2019

Conversation

Projects
None yet
3 participants
@GrahamCampbell
Copy link
Member

GrahamCampbell commented Dec 31, 2018

We can see by the changes to the tests that when force was set to false, --false was still actually being added!!! But, we do want all sub-commands to be forced though, actually, so we should just pass true to avoid confusion, because it otherwise looks like the user would have been asked again if they want to continue for subcommands, when they are not!

The other change is to filter out the defaults, so the empty string is not passed along for no reason.

@taylorotwell taylorotwell merged commit a0b65a2 into 5.7 Jan 1, 2019

4 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/styleci/push The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@GrahamCampbell GrahamCampbell deleted the fix-broken-command-code branch Jan 1, 2019

@driesvints

This comment has been minimized.

Copy link
Member

driesvints commented Jan 2, 2019

We can see by the changes to the tests that when force was set to false, --false was still actually being added!!!

I don't see this in the changes. Can you point out where this is? I assume with --false you mean --force?

@GrahamCampbell

This comment has been minimized.

Copy link
Member

GrahamCampbell commented Jan 2, 2019

Yeh: https://github.com/laravel/framework/pull/27020/files#diff-62bd3530c9c892a12a0b037aa6e0ad10L65. See that ['--force' => false] was resulting in --force being added, so setting it always to true maintains the same behaviour, and is way less confusing.

@driesvints

This comment has been minimized.

Copy link
Member

driesvints commented Jan 2, 2019

@GrahamCampbell heya, forgive me but I don't see ['--force' => false] anywhere?

@GrahamCampbell

This comment has been minimized.

Copy link
Member

GrahamCampbell commented Jan 2, 2019

'--force' => $this->option('force'),

@driesvints

This comment has been minimized.

Copy link
Member

driesvints commented Jan 2, 2019

@GrahamCampbell gotcha!

@GrahamCampbell

This comment has been minimized.

Copy link
Member

GrahamCampbell commented Jan 2, 2019

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment