-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Allow to avoid limit
definition in a RateLimiter configuration when using the no_limit
policy
#48275
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
[FrameworkBundle] Allow to avoid limit
definition in a RateLimiter configuration when using the no_limit
policy
#48275
Conversation
limit
definition in a RateLimiter configuration when using the no_limit
policylimit
definition in a RateLimiter configuration when using the no_limit
policy
c4db134
to
da026ea
Compare
This PR should target 6.3. |
ae43058
to
38448c5
Compare
Updated base branch + added the related CHANGELOG.md entry. |
This seems like a bugfix to me 🤔 |
@MatTheCat I understand your point of view and went for a bugfix as well at first sight. Fundamentally, the |
38448c5
to
3d4b8d5
Compare
@@ -2119,6 +2118,10 @@ private function addRateLimiterSection(ArrayNodeDefinition $rootNode, callable $ | |||
->end() | |||
->end() | |||
->end() | |||
->validate() | |||
->ifTrue(function ($v) { return 'no_limit' !== $v['policy'] && null === ($v['limit'] ?? null); }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!isset()
is just fine, let's not use fancy syntax when not needed.
…ter configuration when using the `no_limit` policy
3d4b8d5
to
cd02eac
Compare
Thank you @alexandre-daubois. |
As stated in the issue, DX will be improved if we can avoid setting a
limit
when usingno_limit
policy.Targets 6.3, as it can be considered as a feature.