Closed
Description
Symfony version(s) affected
From v5.2.0-BETA3
Description
#38665 exposed the no_limit
policy to the configuration without taking its singularity into account. As such it requires the lock component to be installed and enabled, but also a limit
to be configured (it would be ignored).
How to reproduce
Configure a limiter with the no_limit
policy:
framework:
rate_limiter:
no_limit:
policy: no_limit
and you will get an InvalidConfigurationException
:
The child config "limit" under "framework.rate_limiter.limiters.no_limit" must be configured: The maximum allowed hits in a fixed interval or burst
Possible Solution
Do not mark limit
as required and validate it’s set only for policies other than no_limit
.
Additional Context
I don’t think needing to enable the lock component to configure a no_limit
limiter really is an issue, because you would not use only this policy.