-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Symfony\Component\RateLimiter\Policy\SlidingWindow::getExpirationTime(): Return value must be of type int, float returned #45924
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
Comments
Cast is needed indeed. Can you please send a PR to fix this, branch 5.4, with a test case? |
@nicolas-grekas PR added |
…Time (georgringer) This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [RateLimiter] Add typecase to SlidingWindow::getExpirationTime | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #45924 | License | MIT Commits ------- de8a2c2 [RateLimiter] Add typecase to SlidingWindow::getExpirationTime
@nicolas-grekas thanks for the merge! Can you give details for a new release? I am asking because without updating typo3 projects fail hard currently |
Releases happen every month, so end of April now... But this shouldn't be a fatal error. On my side, I only get a deprecation. |
that is kind of a pitty. in TYPO3 core we are getting exceptions with PHP8.1, e.g. in the nightly builds https://git.typo3.org/typo3/CI/cms/-/jobs/1174281 |
We can probably do some hotfix releases in the next couple of days. Let's see first if we have some other emergency fixes. |
I'm not sure this need an emergency fix: from what I understand, the CI is turning a deprecation into an error. That's the issue to me and the CI should be fixed to handle deprecations more seamlessly. There's always also the possibility of locking the version to the previous version while waiting for the next release. |
Granted, in this case it's not a real bug .. but could have been. For example here, the code changed and now the value may be float. If the float would been needed as return value, information would have been lost - and thus a bug. Even if reported as deprecation. Here new code has been added, but with the intention that the float fraction part is not relevant and int is the return value to go. That's one of the reason TYPO3 raised deprecation to fail hard in the pipeline. But that's up to each project itself. We would have preferred a quicker release, but absolutly understandable why the decision is here another. At least from my side. Nothing to discuss here, maybe there is another emergency fix pressing for an earlier release which includes this fix then. Avoid deprecation and eventually related bugs with it as early and hard as possible. Internally and for reporting to 3rd party packages. Given, if TYPO3 still would have had relaxed pipelines this would not have been detected and reported so quickly. Having a red pipeline is a issue on our side (TYPO3), and we will find a way to deal with it. Skipping these tests for the meanwhile until the relase or something like that. Relaxing it is no option - we have found and fixed to much with E_ALL and deprecation as exception to step back here. However - big thanks for the quick response, review and merge on a Sunday in freetime, which ensures this will be included in the next release. I think we will find a way how to deal with this in the TYPO3 core until the release. |
Thanks @sbuerk for finding the right words and all others involved! |
symfony/rate-limiter:5.4.7 has a bug [1] leading to E_DEPRECATED warnings in our functional rate limiting tests. This is mostly test related so it does not make much sense to set this version as conflict. We'll comment two tests while waiting for a patch level release 5.4.8. [1] symfony/symfony#45924 Releases: main, 11.5 Resolves: #97298 Change-Id: Ifb80a631830bb7b50fdc7c9d58d28e0dbf208ad1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74170 Tested-by: Stefan Bürk <[email protected]> Tested-by: core-ci <[email protected]> Tested-by: Oliver Bartsch <[email protected]> Tested-by: Georg Ringer <[email protected]> Reviewed-by: Stefan Bürk <[email protected]> Reviewed-by: Oliver Bartsch <[email protected]> Reviewed-by: Georg Ringer <[email protected]>
symfony/rate-limiter:5.4.7 has a bug [1] leading to E_DEPRECATED warnings in our functional rate limiting tests. This is mostly test related so it does not make much sense to set this version as conflict. We'll comment two tests while waiting for a patch level release 5.4.8. [1] symfony/symfony#45924 Releases: main, 11.5 Resolves: #97298 Change-Id: Ifb80a631830bb7b50fdc7c9d58d28e0dbf208ad1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74170 Tested-by: Stefan Bürk <[email protected]> Tested-by: core-ci <[email protected]> Tested-by: Oliver Bartsch <[email protected]> Tested-by: Georg Ringer <[email protected]> Reviewed-by: Stefan Bürk <[email protected]> Reviewed-by: Oliver Bartsch <[email protected]> Reviewed-by: Georg Ringer <[email protected]>
symfony/rate-limiter:5.4.7 has a bug [1] leading to E_DEPRECATED warnings in our functional rate limiting tests. This is mostly test related so it does not make much sense to set this version as conflict. We'll comment two tests while waiting for a patch level release 5.4.8. [1] symfony/symfony#45924 Releases: main, 11.5 Resolves: #97298 Change-Id: Ifb80a631830bb7b50fdc7c9d58d28e0dbf208ad1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74138 Tested-by: core-ci <[email protected]> Tested-by: Georg Ringer <[email protected]> Reviewed-by: Georg Ringer <[email protected]>
symfony/rate-limiter:5.4.7 has a bug [1] leading to E_DEPRECATED warnings in our functional rate limiting tests. This is mostly test related so it does not make much sense to set this version as conflict. We'll comment two tests while waiting for a patch level release 5.4.8. [1] symfony/symfony#45924 Releases: main, 11.5 Resolves: #97298 Change-Id: Ifb80a631830bb7b50fdc7c9d58d28e0dbf208ad1 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74138 Tested-by: core-ci <[email protected]> Tested-by: Georg Ringer <[email protected]> Reviewed-by: Georg Ringer <[email protected]>
Symfony version(s) affected
5.4.7
Description
With the commit of symfony/rate-limiter@4716500 the method
getExpirationTime
changed and now a float is returned but the return type is set toint
which produces an exceptionHow to reproduce
No out of box code available but using
microtime(true)
returns a floatPossible Solution
type cast like
Additional Context
No response
The text was updated successfully, but these errors were encountered: