Skip to content

Replace $verbose with VERBOSITY_VERBOSE - #11831

Merged
MorrisJobke merged 2 commits into
masterfrom
feature/noid/drop-verbose-scan
Nov 6, 2018
Merged

Replace $verbose with VERBOSITY_VERBOSE#11831
MorrisJobke merged 2 commits into
masterfrom
feature/noid/drop-verbose-scan

Conversation

@kesselb

@kesselbkesselb commented Oct 14, 2018

Copy link
Copy Markdown
Contributor

--verbose and --quiet works out of the box for commands. When you are fine with the default behaviour there is no need to redefine these options within an command.

https://github.com/nextcloud/3rdparty/blob/f48c7e29b8001dff95ac00c16338becef1f175dd/symfony/console/Application.php#L865-L868

This pr replace if ($verbose) with OutputInterface::VERBOSITY_VERBOSE

@kesselbkesselb added enhancement 3. to review Waiting for reviews labels Oct 14, 2018
@kesselbkesselb added this to the Nextcloud 15 milestone Oct 14, 2018
@kesselb

Copy link
Copy Markdown
ContributorAuthor

I'm a bit unsure about this one

# restrict the verbosity level to VERBOSITY_VERBOSE
if ($output->getVerbosity() > OutputInterface::VERBOSITY_VERBOSE) {
$output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
}

suppress output looks wrong to me but it was there before.

@ChristophWurst

Copy link
Copy Markdown
Member

Nice! Didn't know about this flag. Will definitely use this in future commands 🚀

@ChristophWurst

Copy link
Copy Markdown
Member

I'm a bit unsure about this one

Maybe @icewind1991 can give some input on this. Ref ce2dba0.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb
kesselbforce-pushed the feature/noid/drop-verbose-scan branch from 06b2f1b to 1177ad7CompareOctober 21, 2018 20:15
}

$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) {
$output->writeln("\tFile\t<info>$path</info>", OutputInterface::VERBOSITY_VERBOSE);

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@ChristophWurst may i revert \t like you suggested in #11968?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm fine with this.

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested and works 👍

@MorrisJobke
MorrisJobke merged commit a88e7d3 into masterNov 6, 2018
@MorrisJobke
MorrisJobke deleted the feature/noid/drop-verbose-scan branch November 6, 2018 09:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@kesselb@ChristophWurst@MorrisJobke