You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/OptionsResolver/OptionsResolver.php
+4-173Lines changed: 4 additions & 173 deletions
Original file line number
Diff line number
Diff line change
@@ -423,31 +423,6 @@ public function setNormalizer($option, \Closure $normalizer)
423
423
return$this;
424
424
}
425
425
426
-
/**
427
-
* Sets the normalizers for an array of options.
428
-
*
429
-
* @param array $normalizers An array of closures
430
-
*
431
-
* @return OptionsResolver This instance
432
-
*
433
-
* @throws UndefinedOptionsException If the option is undefined
434
-
* @throws AccessException If called from a lazy option or normalizer
435
-
*
436
-
* @see setNormalizer()
437
-
*
438
-
* @deprecated since version 2.6, to be removed in 3.0.
439
-
*/
440
-
publicfunctionsetNormalizers(array$normalizers)
441
-
{
442
-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use setNormalizer() instead.', E_USER_DEPRECATED);
443
-
444
-
foreach ($normalizersas$option => $normalizer) {
445
-
$this->setNormalizer($option, $normalizer);
446
-
}
447
-
448
-
return$this;
449
-
}
450
-
451
426
/**
452
427
* Sets allowed values for an option.
453
428
*
@@ -469,23 +444,12 @@ public function setNormalizers(array $normalizers)
469
444
* @throws UndefinedOptionsException If the option is undefined
470
445
* @throws AccessException If called from a lazy option or normalizer
thrownewAccessException('Allowed values cannot be set from a lazy option or normalizer.');
476
451
}
477
452
478
-
// BC
479
-
if (is_array($option) && null === $allowedValues) {
480
-
trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED);
thrownewAccessException('Allowed values cannot be added from a lazy option or normalizer.');
532
496
}
533
497
534
-
// BC
535
-
if (is_array($option) && null === $allowedValues) {
536
-
trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED);
thrownewAccessException('Allowed types cannot be set from a lazy option or normalizer.');
588
541
}
589
542
590
-
// BC
591
-
if (is_array($option) && null === $allowedTypes) {
592
-
trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED);
thrownewAccessException('Allowed types cannot be added from a lazy option or normalizer.');
638
580
}
639
581
640
-
// BC
641
-
if (is_array($option) && null === $allowedTypes) {
642
-
trigger_error('Calling the '.__METHOD__.' method with an array of options is deprecated since version 2.6 and will be removed in 3.0. Use the new signature with a single option instead.', E_USER_DEPRECATED);
'The option "%s" does not exist. Defined options are: "%s".',
@@ -1031,106 +962,6 @@ public function count()
1031
962
returncount($this->defaults);
1032
963
}
1033
964
1034
-
/**
1035
-
* Alias of {@link setDefault()}.
1036
-
*
1037
-
* @deprecated since version 2.6, to be removed in 3.0.
1038
-
*/
1039
-
publicfunctionset($option, $value)
1040
-
{
1041
-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefaults() method instead.', E_USER_DEPRECATED);
1042
-
1043
-
return$this->setDefault($option, $value);
1044
-
}
1045
-
1046
-
/**
1047
-
* Shortcut for {@link clear()} and {@link setDefaults()}.
1048
-
*
1049
-
* @deprecated since version 2.6, to be removed in 3.0.
1050
-
*/
1051
-
publicfunctionreplace(array$defaults)
1052
-
{
1053
-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED);
1054
-
1055
-
$this->clear();
1056
-
1057
-
return$this->setDefaults($defaults);
1058
-
}
1059
-
1060
-
/**
1061
-
* Alias of {@link setDefault()}.
1062
-
*
1063
-
* @deprecated since version 2.6, to be removed in 3.0.
1064
-
*/
1065
-
publicfunctionoverload($option, $value)
1066
-
{
1067
-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefault() method instead.', E_USER_DEPRECATED);
1068
-
1069
-
return$this->setDefault($option, $value);
1070
-
}
1071
-
1072
-
/**
1073
-
* Alias of {@link offsetGet()}.
1074
-
*
1075
-
* @deprecated since version 2.6, to be removed in 3.0.
1076
-
*/
1077
-
publicfunctionget($option)
1078
-
{
1079
-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED);
1080
-
1081
-
return$this->offsetGet($option);
1082
-
}
1083
-
1084
-
/**
1085
-
* Alias of {@link offsetExists()}.
1086
-
*
1087
-
* @deprecated since version 2.6, to be removed in 3.0.
1088
-
*/
1089
-
publicfunctionhas($option)
1090
-
{
1091
-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED);
1092
-
1093
-
return$this->offsetExists($option);
1094
-
}
1095
-
1096
-
/**
1097
-
* Shortcut for {@link clear()} and {@link setDefaults()}.
1098
-
*
1099
-
* @deprecated since version 2.6, to be removed in 3.0.
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED);
1104
-
1105
-
$this->clear();
1106
-
1107
-
return$this->setDefaults($defaultValues);
1108
-
}
1109
-
1110
-
/**
1111
-
* Alias of {@link setDefined()}.
1112
-
*
1113
-
* @deprecated since version 2.6, to be removed in 3.0.
1114
-
*/
1115
-
publicfunctionsetOptional(array$optionNames)
1116
-
{
1117
-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefined() method instead.', E_USER_DEPRECATED);
1118
-
1119
-
return$this->setDefined($optionNames);
1120
-
}
1121
-
1122
-
/**
1123
-
* Alias of {@link isDefined()}.
1124
-
*
1125
-
* @deprecated since version 2.6, to be removed in 3.0.
1126
-
*/
1127
-
publicfunctionisKnown($option)
1128
-
{
1129
-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the isDefined() method instead.', E_USER_DEPRECATED);
1130
-
1131
-
return$this->isDefined($option);
1132
-
}
1133
-
1134
965
/**
1135
966
* Returns a string representation of the type of the value.
0 commit comments