8000 [FrameworkBundle][RateLimiter] `no_limit` policy requires a limit to be configured · Issue #48268 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[FrameworkBundle][RateLimiter] no_limit policy requires a limit to be configured #48268
Copy link
Closed
@MatTheCat

Description

@MatTheCat

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0