Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92e1f61

Browse files
committed
log warning
1 parentb486c62 commit92e1f61

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/Symfony/Component/OptionsResolver/OptionsResolver.php‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,9 @@ public function setAllowedValues($option, $allowedValues)
549549
thrownewAccessException('Allowed values cannot be set from a lazy option or normalizer.');
550550
}
551551

552-
// Not supported for nested options
553552
if ($this->isNested($option)) {
553+
@trigger_error(sprintf('The "%s" method should not be used with nested options. A failed attempt occurred with the option "%" for values %s',__METHOD__,$option,$this->formatValues($allowedValues)),E_USER_WARNING);
554+
554555
return$this;
555556
}
556557

@@ -599,8 +600,9 @@ public function addAllowedValues($option, $allowedValues)
599600
thrownewAccessException('Allowed values cannot be added from a lazy option or normalizer.');
600601
}
601602

602-
// Not supported for nested options
603603
if ($this->isNested($option)) {
604+
@trigger_error(sprintf('The "%s" method should not be used with nested options. A failed attempt occurred with the option "%" for values %s',__METHOD__,$option,$this->formatValues($allowedValues)),E_USER_WARNING);
605+
604606
return$this;
605607
}
606608

@@ -649,8 +651,9 @@ public function setAllowedTypes($option, $allowedTypes)
649651
thrownewAccessException('Allowed types cannot be set from a lazy option or normalizer.');
650652
}
651653

652-
// Not supported for nested options
653654
if ($this->isNested($option)) {
655+
@trigger_error(sprintf('The "%s" method should not be used with nested options. A failed attempt occurred with the option "%" for types %s',__METHOD__,$option,$this->formatValues($allowedTypes)),E_USER_WARNING);
656+
654657
return$this;
655658
}
656659

@@ -693,8 +696,9 @@ public function addAllowedTypes($option, $allowedTypes)
693696
thrownewAccessException('Allowed types cannot be added from a lazy option or normalizer.');
694697
}
695698

696-
// Not supported for nested options
697699
if ($this->isNested($option)) {
700+
@trigger_error(sprintf('The "%s" method should not be used with nested options. A failed attempt occurred with the option "%" for types %s',__METHOD__,$option,$this->formatValues($allowedTypes)),E_USER_WARNING);
701+
698702
return$this;
699703
}
700704

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp