Skip to content

Commit 06d8f2a

Browse files
committed
Merge branch '2.5'
* 2.5: Remove Spaceless Blocks From Twig Templates Validate locales sets intos translator [Console] Remove estimated field from debug_nomax Fix UserPassword validator translation Remove Spaceless Blocks from Twig Form Templates [Validator] remove wrong deprecation message fixed typo [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses (Prevents CVE-2014-4671) added regression test fix issue #8171 on configuration tree for twig extension -- pairing up with @cordoval [HttpFoundation] Fix wrong assertion in Response test [Upgrade] Fixed markdown syntax [2.3][Form] Cleanup & fix phpdocs Added verbosity methods
2 parents a8cc828 + 386fa63 commit 06d8f2a

File tree

3 files changed

+52
-4
lines changed

3 files changed

+52
-4
lines changed

Helper/ProgressBar.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,13 +547,13 @@ private static function initFormats()
547547
'normal_nomax' => ' %current% [%bar%]',
548548

549549
'verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%',
550-
'verbose_nomax' => ' %current% [%bar%] %percent:3s%% %elapsed:6s%',
550+
'verbose_nomax' => ' %current% [%bar%] %elapsed:6s%',
551551

552-
'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%',
553-
'very_verbose_nomax' => ' %current% [%bar%] %percent:3s%% %elapsed:6s%',
552+
'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%',
553+
'very_verbose_nomax' => ' %current% [%bar%] %elapsed:6s%',
554554

555555
'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%',
556-
'debug_nomax' => ' %current% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%',
556+
'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%',
557557
);
558558
}
559559
}

Output/NullOutput.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,26 @@ public function getVerbosity()
7474
{
7575
return self::VERBOSITY_QUIET;
7676
}
77+
78+
public function isQuiet()
79+
{
80+
return true;
81+
}
82+
83+
public function isVerbose()
84+
{
85+
return false;
86+
}
87+
88+
public function isVeryVerbose()
89+
{
90+
return false;
91+
}
92+
93+
public function isDebug()
94+
{
95+
return false;
96+
}
7797

7898
/**
7999
* {@inheritdoc}

Tests/Helper/ProgressBarTest.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,34 @@ public function testSetFormat()
404404
);
405405
}
406406

407+
/**
408+
* @dataProvider provideFormat
409+
*/
410+
public function testFormatsWithoutMax($format)
411+
{
412+
$bar = new ProgressBar($output = $this->getOutputStream());
413+
$bar->setFormat($format);
414+
$bar->start();
415+
416+
rewind($output->getStream());
417+
$this->assertNotEmpty(stream_get_contents($output->getStream()));
418+
}
419+
420+
/**
421+
* Provides each defined format
422+
*
423+
* @return array
424+
*/
425+
public function provideFormat()
426+
{
427+
return array(
428+
array('normal'),
429+
array('verbose'),
430+
array('very_verbose'),
431+
array('debug'),
432+
);
433+
}
434+
407435
protected function getOutputStream($decorated = true)
408436
{
409437
return new StreamOutput(fopen('php://memory', 'r+', false), StreamOutput::VERBOSITY_NORMAL, $decorated);

0 commit comments

Comments
 (0)