-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Add the PHP 7 polyfill for the random_bytes function #16365
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
@@ -19,7 +19,8 @@ | |||
"php": ">=5.3.9", | |||
"symfony/security": "~2.8|~3.0.0", | |||
"symfony/security-acl": "~2.7|~3.0.0", | |||
"symfony/http-kernel": "~2.2|~3.0.0" | |||
"symfony/http-kernel": "~2.2|~3.0.0", | |||
"symfony/polyfill-php70": "~1.0" |
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.
This is not needed. We don't call any of the random functions directly in the SecurityBundle.
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.
It is called in UserPasswordEncoderCommand.php#L167
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.
indeed
Status: Needs work |
👍 Status: Reviewed |
@@ -19,6 +19,7 @@ | |||
"php": ">=5.3.9", | |||
"symfony/polyfill-php55": "~1.0", | |||
"symfony/polyfill-php56": "~1.0", | |||
"symfony/polyfill-php70": "~1.0", |
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.
this one needs to be removed in 3.0 as its only there for the deprecated SecureRandom class
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.
Fixed in #16381
👍 |
Thank you @pierredup. |
…redup) This PR was merged into the 2.8 branch. Discussion ---------- Add the PHP 7 polyfill for the random_bytes function | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Some classes (like the `SecureRandom` class) currently depends on the `random_bytes` function, which is only available in the PHP 7 polyfill Commits ------- 8ab8ca0 Add the PHP 7 polyfill for the random_bytes function
Some classes (like the
SecureRandom
class) currently depends on therandom_bytes
function, which is only available in the PHP 7 polyfill