8000 Merge branch '2.7' into 2.8 · symfony/symfony@a0e654d · GitHub
[go: up one dir, main page]

Skip to content

Commit a0e654d

Browse files
Merge branch '2.7' into 2.8
* 2.7: [HttpKernel] Fix test Remove port from default host in server:status command [Console] Escape exception messages
2 parents d175340 + dd37126 commit a0e654d

File tree

4 files changed

+20
-19
lines changed

4 files changed

+20
-19
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function configure()
3232
{
3333
$this
3434
->setDefinition(array(
35-
new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1:8000'),
35+
new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'),
3636
new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'),
3737
))
3838
->setName('server:status')

src/Symfony/Component/Console/Application.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Console\Descriptor\TextDescriptor;
1515
use Symfony\Component\Console\Descriptor\XmlDescriptor;
1616
use Symfony\Component\Console\Exception\ExceptionInterface;
17+
use Symfony\Component\Console\Formatter\OutputFormatter;
1718
use Symfony\Component\Console\Helper\DebugFormatterHelper;
1819
use Symfony\Component\Console\Helper\ProcessHelper;
1920
use Symfony\Component\Console\Helper\QuestionHelper;
@@ -654,7 +655,7 @@ public function renderException($e, $output)
654655
}
655656
$formatter = $output->getFormatter();
656657
$lines = array();
657-
foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) {
658+
foreach (preg_split('/\r?\n/', OutputFormatter::escape($e->getMessage())) as $line) {
658659
foreach ($this->splitStringByWidth($line, $width - 4) as $line) {
659660
// pre-format lines to get the right string length
660661
$lineLength = $this->stringWidth(preg_replace('/\[[^m]*m/', '', $formatter->format($line))) + 4;

src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt

Lines change 8000 d: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

2-
3-
[Exception]
4-
Third exception comment
5-
2+
3+
[Exception]
4+
Third exception <fg=blue;bg=red>comment</>
5+
66

7-
8-
[Exception]
9-
Second exception comment
10-
7+
8+
[Exception]
9+
Second exception <comment>comment</comment>
10+
1111

1212

1313
[Exception]

src/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

2-
 
3-
 [Exception] 
4-
 Third exception comment 
5-
 
2+
 
3+
 [Exception] 
4+
 Third exception <fg=blue;bg=red>comment</> 
5+
 
66

7-
 
8-
 [Exception] 
9-
 Second exception comment 
10-
 
7+
 
8+
 [Exception] 
9+
 Second exception <comment>comment</comment> 
10+
 
1111

1212
 
1313
 [Exception] 
14-
 First exception <p>this is html</p> 
14+
 First exception <p>this is html</p> 
1515
 
1616

1717
foo3:bar

0 commit comments

Comments
 (0)
0