File tree 1 file changed +1
-5
lines changed
src/Symfony/Bundle/FrameworkBundle/DependencyInjection
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -1812,15 +1812,11 @@ private function addRateLimiterSection(ArrayNodeDefinition $rootNode)
1812
1812
->info ('Rate limiter configuration ' )
1813
1813
->{!class_exists (FullStack::class) && class_exists (TokenBucketLimiter::class) ? 'canBeDisabled ' : 'canBeEnabled ' }()
1814
1814
->fixXmlConfig ('limiter ' )
1815
- ->beforeNormalization ()
1816
- ->ifTrue (function ($ v ) { return \is_array ($ v ) && !isset ($ v ['enabled ' ]); })
1817
- ->then (function ($ v ) { return $ v + ['enabled ' => true ]; })
1818
- ->end ()
1819
1815
->beforeNormalization ()
1820
1816
->ifTrue (function ($ v ) { return \is_array ($ v ) && !isset ($ v ['limiters ' ]) && !isset ($ v ['limiter ' ]); })
1821
1817
->then (function (array $ v ) {
1822
1818
$ newV = [
1823
- 'enabled ' => $ v ['enabled ' ],
1819
+ 'enabled ' => $ v ['enabled ' ] ?? true ,
1824
1820
];
1825
1821
unset($ v ['enabled ' ]);
1826
1822
You can’t perform that action at this time.
0 commit comments