Skip to content

Commit 70d8645

Browse files
committed
Fix excluded_http_codes not warning when used improperly, fixes #271
1 parent 09769ce commit 70d8645

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

DependencyInjection/Configuration.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,10 @@ public function getConfigTreeBuilder()
708708
->ifTrue(function ($v) { return 'fingers_crossed' === $v['type'] && !empty($v['excluded_http_codes']) && !empty($v['excluded_404s']); })
709709
->thenInvalid('You can not use excluded_http_codes together with excluded_404s in a FingersCrossedHandler')
710710
->end()
711+
->validate()
712+
->ifTrue(function ($v) { return 'fingers_crossed' !== $v['type'] && !empty($v['excluded_http_codes']) || !empty($v['excluded_404s']); })
713+
->thenInvalid('You can only use excluded_http_codes/excluded_404s with a FingersCrossedHandler definition')
714+
->end()
711715
->validate()
712716
->ifTrue(function ($v) { return 'filter' === $v['type'] && "DEBUG" !== $v['min_level'] && !empty($v['accepted_levels']); })
713717
->thenInvalid('You can not use min_level together with accepted_levels in a FilterHandler')

0 commit comments

Comments
 (0)