Skip to content

Fix Base64OutputStream on HHVM#2

Merged
thekid merged 3 commits into
masterfrom
fix/hhvm-base64
Jun 19, 2017
Merged

Fix Base64OutputStream on HHVM#2
thekid merged 3 commits into
masterfrom
fix/hhvm-base64

Conversation

@thekid

@thekid thekid commented Jun 19, 2017

Copy link
Copy Markdown
Member

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
Copy Markdown
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

thekid commented Jun 19, 2017

Copy link
Copy Markdown
Member Author

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