Skip to content

Commit 00aad41

Browse files
committed
Silence invasive deprecation warnings, opt-in for warnings
1 parent 151155b commit 00aad41

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

OptionsResolver.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ public function setNormalizer($option, \Closure $normalizer)
439439
*/
440440
public function setNormalizers(array $normalizers)
441441
{
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);
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);
443443

444444
foreach ($normalizers as $option => $normalizer) {
445445
$this->setNormalizer($option, $normalizer);
@@ -477,7 +477,7 @@ public function setAllowedValues($option, $allowedValues = null)
477477

478478
// BC
479479
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);
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);
481481

482482
foreach ($option as $optionName => $optionValues) {
483483
$this->setAllowedValues($optionName, $optionValues);
@@ -533,7 +533,7 @@ public function addAllowedValues($option, $allowedValues = null)
533533

534534
// BC
535535
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);
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);
537537

538538
foreach ($option as $optionName => $optionValues) {
539539
$this->addAllowedValues($optionName, $optionValues);
@@ -589,7 +589,7 @@ public function setAllowedTypes($option, $allowedTypes = null)
589589

590590
// BC
591591
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);
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);
593593

594594
foreach ($option as $optionName => $optionTypes) {
595595
$this->setAllowedTypes($optionName, $optionTypes);
@@ -639,7 +639,7 @@ public function addAllowedTypes($option, $allowedTypes = null)
639639

640640
// BC
641641
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);
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);
643643

644644
foreach ($option as $optionName => $optionTypes) {
645645
$this->addAllowedTypes($optionName, $optionTypes);
@@ -1032,7 +1032,7 @@ public function count()
10321032
*/
10331033
public function set($option, $value)
10341034
{
1035-
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);
1035+
@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);
10361036

10371037
return $this->setDefault($option, $value);
10381038
}
@@ -1044,7 +1044,7 @@ public function set($option, $value)
10441044
*/
10451045
public function replace(array $defaults)
10461046
{
1047-
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);
1047+
@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);
10481048

10491049
$this->clear();
10501050

@@ -1058,7 +1058,7 @@ public function replace(array $defaults)
10581058
*/
10591059
public function overload($option, $value)
10601060
{
1061-
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);
1061+
@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);
10621062

10631063
return $this->setDefault($option, $value);
10641064
}
@@ -1070,7 +1070,7 @@ public function overload($option, $value)
10701070
*/
10711071
public function get($option)
10721072
{
1073-
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);
1073+
@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);
10741074

10751075
return $this->offsetGet($option);
10761076
}
@@ -1082,7 +1082,7 @@ public function get($option)
10821082
*/
10831083
public function has($option)
10841084
{
1085-
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);
1085+
@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);
10861086

10871087
return $this->offsetExists($option);
10881088
}
@@ -1094,7 +1094,7 @@ public function has($option)
10941094
*/
10951095
public function replaceDefaults(array $defaultValues)
10961096
{
1097-
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);
1097+
@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);
10981098

10991099
$this->clear();
11001100

@@ -1108,7 +1108,7 @@ public function replaceDefaults(array $defaultValues)
11081108
*/
11091109
public function setOptional(array $optionNames)
11101110
{
1111-
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);
1111+
@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);
11121112

11131113
return $this->setDefined($optionNames);
11141114
}
@@ -1120,7 +1120,7 @@ public function setOptional(array $optionNames)
11201120
*/
11211121
public function isKnown($option)
11221122
{
1123-
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);
1123+
@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);
11241124

11251125
return $this->isDefined($option);
11261126
}

0 commit comments

Comments
 (0)