Uh oh!
There was an error while loading. Please reload this page.
Enhancement: Enable random_api_migration fixer - #699
Conversation
Co-authored-by: Andreas Möller <am@localheinz.com> Co-authored-by: Mathias Reker <mathias@reker.dk>
Co-authored-by: Andreas Möller <am@localheinz.com> Co-authored-by: Mathias Reker <mathias@reker.dk>
cmb69
commented
Sep 12, 2022
Hmm, replacing |
Looks like it is not possible to seed the generator when using In other words, the tests would be failing. We could, however, extract (and thus decouple) a |
TimWolla
commented
Sep 12, 2022
Yes, this is by design.
Likely not worth it. Use |
localheinz
commented
Sep 12, 2022
Sounds great, but the production system currently runs on PHP 7.3 (maybe), and apparently nobody knows who is responsible for it nor how it could be upgraded to use a current PHP version. |
TimWolla
commented
Sep 12, 2022
Yes, that's why I put the "once PHP 8.2 is available to use" there. This was not referring to the gold release in November, but to whenever the requirements for web-php are increased. Adding a wrapper for the pre-PHP-8.2 RNGs is IMO pure busy work, using the CSPRNG would be great, but if it's painful to do, then it's not worth it just for the anti-spam challenges. |
morrisonlevi
commented
Sep 15, 2022
IMO, we can merge this as-is. Is there something better? Maybe, but this is a clear improvement that we can merge right this moment, yes? |
cmb69
commented
Sep 16, 2022
Oh, indeed, I forgot about the tests. So I agree with @morrisonlevi that this is a step forward. Thank you all! |
localheinz
commented
Sep 16, 2022
Thank you, @cmb69, @morrisonlevi, and @TimWolla! |
This pull request
random_api_migrationfixermake coding-standardsReplaces #545.
Follows #559.
💁♂️ For reference, see https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.4.0/doc/rules/alias/random_api_migration.rst.