8000 [RateLimiter] RateLimiterFactory should implement a generic interface for mocks or be made non-final · Issue #58920 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[RateLimiter] RateLimiterFactory should implement a generic interface for mocks or be made non-final #58920
@pkly

Description

@pkly

Description

As of 6.4.* the glorious rate-limiter component cannot be easily mocked in unit tests, as the RateLimiterFactory class is final. While this makes sense for the general usability it could also implement a RateLimiterFactoryInterface with a create method, which would behave the same as the current component.

Optionally it could be made non-final, which would allow for the same behavior in tests (which looking at what the configuration does seem like the better idea for now?)

Example

No response

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