-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Refactor HashContext into an object. #660
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
Base64-encoding makes sense |
Sorry, I was with my head in a different branch. This class does not support serialize. (Though I will use base64 for that branch.) |
Can one of the admins verify this patch? |
I'll pick this up to update it for PHP7 and propose an RFC for it. Will keep your name on the commit of course. |
I've rewritten this patch for PHP7 as master...sgolemon:pr-660 with a couple notable differences:
|
ping @sara, there are conflicts, I didn't look close, sorry if silly ... |
@krokjoe The conflicts are on @realityking's original PR (this diff), which is against PHP5. My rewrite of it is over at master...sgolemon:pr-660 |
Comment on behalf of pollita at php.net: To minimize confusion, I'm closing this PR. Please reference my branch (linked above) for the current patch. |
Also... @krakjoe, not @krokjoe :p |
@sgolemon Can you please also open a PR for your branch? Otherwise not possible to review. |
This is essentially #611 without adding methods to the object.
Tests all pass, one required modification as it relied on the output of var_dump. The B/C break is very small, code that relies on checking is_resource() fails and needs to be changed to also do ìnstanceof HashContext`.
The new class offers only
__construct()
and a clone handler, everything else has to be done to he procedural API.HashContext
can also be serialized. Currently this is simply binary data. I wonder if this should be base64/base85 encoded?