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: OptionsResolver.php
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1015,6 +1015,8 @@ public function count()
1015
1015
*/
1016
1016
publicfunctionset($option, $value)
1017
1017
{
1018
+
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);
1019
+
1018
1020
return$this->setDefault($option, $value);
1019
1021
}
1020
1022
@@ -1025,6 +1027,8 @@ public function set($option, $value)
1025
1027
*/
1026
1028
publicfunctionreplace(array$defaults)
1027
1029
{
1030
+
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);
1031
+
1028
1032
$this->clear();
1029
1033
1030
1034
return$this->setDefaults($defaults);
@@ -1037,6 +1041,8 @@ public function replace(array $defaults)
1037
1041
*/
1038
1042
publicfunctionoverload($option, $value)
1039
1043
{
1044
+
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);
1045
+
1040
1046
return$this->setDefault($option, $value);
1041
1047
}
1042
1048
@@ -1047,6 +1053,8 @@ public function overload($option, $value)
1047
1053
*/
1048
1054
publicfunctionget($option)
1049
1055
{
1056
+
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);
1057
+
1050
1058
return$this->offsetGet($option);
1051
1059
}
1052
1060
@@ -1057,6 +1065,8 @@ public function get($option)
1057
1065
*/
1058
1066
publicfunctionhas($option)
1059
1067
{
1068
+
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);
1069
+
1060
1070
return$this->offsetExists($option);
1061
1071
}
1062
1072
@@ -1067,6 +1077,8 @@ public function has($option)
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);
1081
+
1070
1082
$this->clear();
1071
1083
1072
1084
return$this->setDefaults($defaultValues);
@@ -1079,6 +1091,8 @@ public function replaceDefaults(array $defaultValues)
1079
1091
*/
1080
1092
publicfunctionsetOptional(array$optionNames)
1081
1093
{
1094
+
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);
1095
+
1082
1096
return$this->setDefined($optionNames);
1083
1097
}
1084
1098
@@ -1089,6 +1103,8 @@ public function setOptional(array $optionNames)
1089
1103
*/
1090
1104
publicfunctionisKnown($option)
1091
1105
{
1106
+
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);
Copy file name to clipboardExpand all lines: OptionsResolverInterface.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
12
12
namespaceSymfony\Component\OptionsResolver;
13
13
14
-
trigger_error('The "Symfony\Component\OptionsResolver\OptionsResolverInterface" interface was deprecated in version 2.6 and will be removed in 3.0. Use "Symfony\Component\OptionsResolver\OptionsResolver" instead.', E_USER_DEPRECATED);
14
+
trigger_error('The '.__NAMESPACE__.'\OptionsResolverInterface interface is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\OptionsResolver\OptionsResolver class instead.', E_USER_DEPRECATED);
0 commit comments