Skip to content

Commit 6a92f4e

Browse files
committed
Merge branch '2.3' into 2.7
* 2.3: [Form] fix symfony#15544 when a collection type attribute "required" is false, "prototype" should too updated validators.bg.xlf [Security] Enable bcrypt validation and result length tests on all PHP versions [Security] Verify if a password encoded with bcrypt is no longer than 72 characters [Console] Avoid extra blank lines when rendering exceptions [Yaml] do not remove "comments" in scalar blocks
2 parents dae4267 + f371445 commit 6a92f4e

17 files changed

+189
-47
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,8 @@ public function asXml($namespace = null, $asDom = false)
631631
*/
632632
public function renderException($e, $output)
633633
{
634+
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
635+
634636
do {
635637
$title = sprintf(' [%s] ', get_class($e));
636638

@@ -653,15 +655,14 @@ public function renderException($e, $output)
653655
}
654656
}
655657

656-
$messages = array('', '');
658+
$messages = array();
657659
$messages[] = $emptyLine = $formatter->format(sprintf('<error>%s</error>', str_repeat(' ', $len)));
658660
$messages[] = $formatter->format(sprintf('<error>%s%s</error>', $title, str_repeat(' ', max(0, $len - $this->stringWidth($title)))));
659661
foreach ($lines as $line) {
660662
$messages[] = $formatter->format(sprintf('<error> %s %s</error>', $line[0], str_repeat(' ', $len - $line[1])));
661663
}
662664
$messages[] = $emptyLine;
663665
$messages[] = '';
664-
$messages[] = '';
665666

666667
$output->writeln($messages, OutputInterface::OUTPUT_RAW);
667668

@@ -688,14 +689,12 @@ public function renderException($e, $output)
688689
}
689690

690691
$output->writeln('');
691-
$output->writeln('');
692692
}
693693
} while ($e = $e->getPrevious());
694694

695695
if (null !== $this->runningCommand) {
696696
$output->writeln(sprintf('<info>%s</info>', sprintf($this->runningCommand->getSynopsis(), $this->getName())));
697697
$output->writeln('');
698-
$output->writeln('');
699698
}
700699
}
701700

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11

2-
32

43
[InvalidArgumentException]
54
Command "foo" is not defined.
65

76

8-
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11

2-
32

43
[InvalidArgumentException]
54
The "--foo" option does not exist.
65

76

8-
97
list [--xml] [--raw] [--format FORMAT] [--] [<namespace>]
108

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

2-
32

43
[Exception]
54
Third exception comment
65

76

8-
9-
10-
117

128
[Exception]
139
Second exception comment
1410

1511

16-
17-
18-
1912

2013
[Exception]
2114
First exception <p>this is html</p>
2215

2316

24-
2517
foo3:bar
2618

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

2-
32
 
43
 [Exception] 
54
 Third exception comment 
65
 
76

8-
9-
10-
117
 
128
 [Exception] 
139
 Second exception comment 
1410
 
1511

16-
17-
18-
1912
 
2013
 [Exception] 
2114
 First exception <p>this is html</p> 
2215
 
2316

24-
2517
foo3:bar
2618

27-
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11

2-
32

43
[InvalidArgumentException]
54
Command "foo" is not define
65
d.
76

87

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

2-
32

43
[Exception]
54
エラーメッセージ
65

76

8-
97
foo
108

11-
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11

2-
32
 
43
 [Exception] 
54
 エラーメッセージ 
65
 
76

8-
97
foo
108

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

2-
32

43
[Exception]
54
コマンドの実行中にエラーが
65
発生しました。
76

87

9-
108
foo
119

12-

src/Symfony/Component/Form/Extension/Core/Type/CollectionType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
2828
{
2929
if ($options['allow_add'] && $options['prototype']) {
3030
$prototype = $builder->create($options['prototype_name'], $options['type'], array_replace(array(
31+
'required' => $options['required'],
3132
'label' => $options['prototype_name'].'label__',
3233
), $options['options']));
3334
$builder->setAttribute('prototype', $prototype->getForm());

0 commit comments

Comments
 (0)