Skip to content

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

Merged
merged 1 commit into from
Oct 29, 2015

Conversation

pierredup
Copy link
Contributor

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

@@ -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"
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed

@xabbuh
Copy link
Member

xabbuh commented Oct 28, 2015

Status: Needs work

@xabbuh
Copy link
Member

xabbuh commented Oct 28, 2015

👍

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",
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #16381

@Tobion
Copy link
Contributor

Tobion commented Oct 29, 2015

👍

@Tobion
Copy link
Contributor

Tobion commented Oct 29, 2015

Thank you @pierredup.

@Tobion Tobion merged commit 8ab8ca0 into symfony:2.8 Oct 29, 2015
Tobion added a commit that referenced this pull request Oct 29, 2015
…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
@pierredup pierredup deleted the patch-1 branch October 30, 2015 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants