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
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -428,6 +428,8 @@ public function setNormalizer($option, \Closure $normalizer)
428
428
*/
429
429
publicfunctionsetNormalizers(array$normalizers)
430
430
{
431
+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use setNormalizer() instead.', E_USER_DEPRECATED);
432
+
431
433
foreach ($normalizersas$option => $normalizer) {
432
434
$this->setNormalizer($option, $normalizer);
433
435
}
@@ -464,6 +466,8 @@ public function setAllowedValues($option, $allowedValues = null)
464
466
465
467
// BC
466
468
if (is_array($option) && null === $allowedValues) {
469
+
trigger_error('Calling the '.__METHOD__.' method with an array 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);
@@ -518,6 +522,8 @@ public function addAllowedValues($option, $allowedValues = null)
518
522
519
523
// BC
520
524
if (is_array($option) && null === $allowedValues) {
525
+
trigger_error('Calling the '.__METHOD__.' method with an array 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);
@@ -570,6 +576,8 @@ public function setAllowedTypes($option, $allowedTypes = null)
570
576
571
577
// BC
572
578
if (is_array($option) && null === $allowedTypes) {
579
+
trigger_error('Calling the '.__METHOD__.' method with an array 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);
@@ -618,6 +626,8 @@ public function addAllowedTypes($option, $allowedTypes = null)
618
626
619
627
// BC
620
628
if (is_array($option) && null === $allowedTypes) {
629
+
trigger_error('Calling the '.__METHOD__.' method with an array 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);
0 commit comments