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

Refactor commands to avoid wrong output #827

Merged
merged 8 commits into from Jun 27, 2018

Conversation

OskarStark
Copy link
Contributor

Please review commit by commit.
Could be squashed after review into one.

Before:
screenshot 2018-06-22 10 54 43

this is wrong, as my DB is luna and my connection is default

After:
screenshot 2018-06-22 10 39 57
screenshot 2018-06-22 10 40 04

like in CreateDatabaseDoctrineCommand
like in CreateDoctrineDatabaseCommand
before not output of the dropped database name was given,
only the connection name.
@@ -49,7 +49,12 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$connection = $this->getDoctrineConnection($input->getOption('connection'));
$connectionName = $input->getOption('connection');
if (empty($connectionName) === true) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=== true is useless. empty($connectionName) is already a boolean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh I just copy pasted this part from the create command

shall I change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i changed it 👍

@OskarStark
Copy link
Contributor Author

I also fixed the Code-Quality build, which belongs to this PR.
There are 2 other changes need:
https://travis-ci.org/doctrine/DoctrineBundle/jobs/395400139

Shall I change them in this or in an extra PR?

@OskarStark
Copy link
Contributor Author

Would be happy to get this merged 😄

Copy link
Contributor

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@kimhemsoe kimhemsoe merged commit 217eaab into doctrine:master Jun 27, 2018
@kimhemsoe
Copy link
Member

Thanks @OskarStark

@OskarStark OskarStark deleted the refactor-commands branch June 27, 2018 13:04
@kimhemsoe kimhemsoe added this to the 1.9.2 milestone Oct 30, 2018
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

Successfully merging this pull request may close these issues.

None yet

4 participants