Description
Symfony version(s) affected
5.4+
Description
I'm using the XML version config.
<framework:config>
<framework:rate-limiter>
<framework:limiter name="access_setting_update"
policy="sliding_window"
limit="30"
interval="3 minutes"
/>
</framework:rate-limiter>
</framework:config>
The application works, but calling debug:container
causes the error below.
[ERROR 1866] Element '{http://symfony.com/schema/dic/symfony}limiter', attribute 'policy': The attribute 'policy' is not allowed. (in /var/www/ - line 16, column 0)
Further digging in the code led me to a probable error in the XSD. The policy
attribute does not appear in XSD, but we see strategy
. When we use strategy
we get the following error within the whole application.
Unrecognized option "strategy" under "framework.rate_limiter.limiters.access_setting_update". Available options are "cache_pool", "interval", "limit", "lock_factory", "policy", "rate", "storage_service".
How to reproduce
- Install Rate Limiter
- Setup configuration in XML
- Run
debug:container
console command
Possible Solution
Change attribute strategy
to policy
in rate_limiter_limiter
section in symfony-1.0.xsd
.
Additional Context
No response