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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pkly opened this issue Nov 19, 2024 · 0 comments · Fixed by #58939

Comments

@pkly
Copy link
pkly commented Nov 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0