Skip to content

Commit 60f98ae

Browse files
committed
Merge branch '2.7'
* 2.7: fixed tests [OptionsResolver] replaced some exception messages Added i18n support to ConfirmationQuestion [HttpKernel] [WebProfilerBundle] added HTTP status to profiler search result [Form] fixed form tests when using 2.7 deps [2.3] [HttpFoundation] [MimeTypeGuesser] [Routing] merge instead of replace class and method scheme/method annotations [TwigBridge] Fix bootstrap rendering when user explicitly use form_label Removed dead code and various cleaning Removed dead code and various cleaning Fixed HtmlDumper with long string Removed dead code and various cleaning [FrameworkBundle][xsd] added missing logging attribute. [Console] Make it clear that the second argument is not about command options. Added the '-' character for spaceless on tag start and end to be consistent for block, if, set and for nodes [Yaml] fixed parse shortcut Key after unindented collection. [Console] fixed #10531 Make the container considered non-fresh if the environment parameters are changed Conflicts: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig src/Symfony/Component/HttpKernel/CHANGELOG.md src/Symfony/Component/Process/Process.php
2 parents 3e3c184 + f9ca599 commit 60f98ae

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

OptionsResolver.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public function setNormalizer($option, \Closure $normalizer)
409409

410410
if (!isset($this->defined[$option])) {
411411
throw new UndefinedOptionsException(sprintf(
412-
'The option "%s" does not exist. Known options are: "%s".',
412+
'The option "%s" does not exist. Defined options are: "%s".',
413413
$option,
414414
implode('", "', array_keys($this->defined))
415415
));
@@ -473,7 +473,7 @@ public function setAllowedValues($option, $allowedValues = null)
473473

474474
if (!isset($this->defined[$option])) {
475475
throw new UndefinedOptionsException(sprintf(
476-
'The option "%s" does not exist. Known options are: "%s".',
476+
'The option "%s" does not exist. Defined options are: "%s".',
477477
$option,
478478
implode('", "', array_keys($this->defined))
479479
));
@@ -527,7 +527,7 @@ public function addAllowedValues($option, $allowedValues = null)
527527

528528
if (!isset($this->defined[$option])) {
529529
throw new UndefinedOptionsException(sprintf(
530-
'The option "%s" does not exist. Known options are: "%s".',
530+
'The option "%s" does not exist. Defined options are: "%s".',
531531
$option,
532532
implode('", "', array_keys($this->defined))
533533
));
@@ -579,7 +579,7 @@ public function setAllowedTypes($option, $allowedTypes = null)
579579

580580
if (!isset($this->defined[$option])) {
581581
throw new UndefinedOptionsException(sprintf(
582-
'The option "%s" does not exist. Known options are: "%s".',
582+
'The option "%s" does not exist. Defined options are: "%s".',
583583
$option,
584584
implode('", "', array_keys($this->defined))
585585
));
@@ -627,7 +627,7 @@ public function addAllowedTypes($option, $allowedTypes = null)
627627

628628
if (!isset($this->defined[$option])) {
629629
throw new UndefinedOptionsException(sprintf(
630-
'The option "%s" does not exist. Known options are: "%s".',
630+
'The option "%s" does not exist. Defined options are: "%s".',
631631
$option,
632632
implode('", "', array_keys($this->defined))
633633
));
@@ -742,7 +742,7 @@ public function resolve(array $options = array())
742742
ksort($diff);
743743

744744
throw new UndefinedOptionsException(sprintf(
745-
(count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Known options are: "%s".',
745+
(count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Defined options are: "%s".',
746746
implode('", "', array_keys($diff)),
747747
implode('", "', array_keys($clone->defined))
748748
));
@@ -808,7 +808,7 @@ public function offsetGet($option)
808808
if (!array_key_exists($option, $this->defaults)) {
809809
if (!isset($this->defined[$option])) {
810810
throw new NoSuchOptionException(sprintf(
811-
'The option "%s" does not exist. Known options are: "%s".',
811+
'The option "%s" does not exist. Defined options are: "%s".',
812812
$option,
813813
implode('", "', array_keys($this->defined))
814814
));

Tests/LegacyOptionsResolverTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ public function testResolveLazyReplaceDefaults()
197197
}
198198

199199
/**
200-
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
200+
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
201+
* @expectedExceptionMessage The option "foo" does not exist. Defined options are: "one", "three", "two".
201202
*/
202203
public function testResolveFailsIfNonExistingOption()
203204
{

Tests/OptionsResolver2Dot6Test.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function setUp()
3333

3434
/**
3535
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
36-
* @expectedExceptionMessage The option "foo" does not exist. Known options are: "a", "z".
36+
* @expectedExceptionMessage The option "foo" does not exist. Defined options are: "a", "z".
3737
*/
3838
public function testResolveFailsIfNonExistingOption()
3939
{
@@ -45,7 +45,7 @@ public function testResolveFailsIfNonExistingOption()
4545

4646
/**
4747
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
48-
* @expectedExceptionMessage The options "baz", "foo", "ping" do not exist. Known options are: "a", "z".
48+
* @expectedExceptionMessage The options "baz", "foo", "ping" do not exist. Defined options are: "a", "z".
4949
*/
5050
public function testResolveFailsIfMultipleNonExistingOptions()
5151
{
@@ -1389,7 +1389,7 @@ public function testArrayAccessUnsetNotSupported()
13891389

13901390
/**
13911391
* @expectedException \Symfony\Component\OptionsResolver\Exception\NoSuchOptionException
1392-
* @expectedExceptionMessage The option "undefined" does not exist. Known options are: "foo", "lazy".
1392+
* @expectedExceptionMessage The option "undefined" does not exist. Defined options are: "foo", "lazy".
13931393
*/
13941394
public function testFailIfGetNonExisting()
13951395
{

0 commit comments

Comments
 (0)