We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6474ee commit 56e02f6Copy full SHA for 56e02f6
src/DependencyInjection/Configuration.php
@@ -49,8 +49,16 @@ public function getConfigTreeBuilder(): TreeBuilder
49
->scalarNode('page_range')
50
->defaultValue(5)
51
->end()
52
- ->integerNode('page_limit')
+ ->scalarNode('page_limit')
53
->defaultNull()
54
+ ->validate()
55
+ ->ifTrue(static fn (mixed $v): bool => null !== $v && !\is_int($v))
56
+ ->thenInvalid('The page_limit must be an integer or null.')
57
+ ->end()
58
+ ->beforeNormalization()
59
+ ->ifNull()
60
+ ->then(static fn (mixed $v): int => 5)
61
62
63
->booleanNode('convert_exception')
64
->defaultFalse()
0 commit comments