-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[RateLimiter] Implicit conversion fix #45067
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
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
General note: Bugfixes should target the lowest maintained branch that is affected by the bug. In this case this is probably 5.3 or 5.4. |
Linking #41552 to keep track of such bugs. 🙂 |
Doing an explicit conversion will not avoid the precision loss. It will only make it silent rather than having a warning. So to me, this does not fix the bug. It hides the bug. |
I will update this to target an older version.
Indeed, the better way would be to calculate the value as int instead of float (as usleep() only support int) |
No, the better way would be to perform the int cast after multiplying the delta with |
Thank you @brian978. |
This PR fixes the deprecation notice "Deprecated: Implicit conversion from float <float_number> to int loses precision"