Skip to content
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

Fix Base64OutputStream on HHVM #2

Merged
merged 3 commits into from
Jun 19, 2017
Merged

Fix Base64OutputStream on HHVM #2

merged 3 commits into from
Jun 19, 2017

Conversation

thekid
Copy link
Member

@thekid thekid commented Jun 19, 2017

This pull request implements the base64 output stream in userland on HHVM, working around facebook/hhvm#7659. See xp-framework/core#176

I first went down the way of implementing a php_user_filter class and exchanging the stream filter with this implementation, however, its filter() method doesn't get invoked for the last chunk when the stream is closing due to facebook/hhvm#7889 - we need this to add potentially necessary padding.

@thekid thekid added the bug label Jun 19, 2017
$pos= $l - $o;
};
} else {
$this->write= Type::forName('function(var): var')->cast([$this->out, 'write']);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is essentially Closure::fromCallable(), but this PHP 7.1 feature doesn't exist in HHVM yet, see facebook/hhvm#7874

@thekid thekid merged commit 5e8a805 into master Jun 19, 2017
@thekid thekid deleted the fix/hhvm-base64 branch June 19, 2017 21:05
thekid added a commit that referenced this pull request Jun 19, 2017
@thekid
Copy link
Member Author

thekid commented Jun 19, 2017

thekid added a commit that referenced this pull request May 31, 2020
HHVM no longer supports PHP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant