From 707c2ff7b7ccbc1ebfabbde12ef92e2dce47714c Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Sun, 10 Mar 2019 13:02:28 +0100 Subject: drop hhvm support --- src/HTML5/Parser/DOMTreeBuilder.php | 12 +----------- src/HTML5/Serializer/OutputRules.php | 4 +--- 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'src/HTML5') diff --git a/src/HTML5/Parser/DOMTreeBuilder.php b/src/HTML5/Parser/DOMTreeBuilder.php index f01cf4d..9894625 100644 --- a/src/HTML5/Parser/DOMTreeBuilder.php +++ b/src/HTML5/Parser/DOMTreeBuilder.php @@ -391,11 +391,6 @@ class DOMTreeBuilder implements EventHandler // to avoid spl_object_hash collisions whe have to avoid garbage collection of $ele storing it into $pushes // see https://bugs.php.net/bug.php?id=67459 $this->pushes[spl_object_hash($ele)] = array($pushes, $ele); - - // SEE https://github.com/facebook/hhvm/issues/2962 - if (defined('HHVM_VERSION')) { - $ele->setAttribute('html5-php-fake-id-attribute', spl_object_hash($ele)); - } } foreach ($attributes as $aName => $aVal) { @@ -509,12 +504,7 @@ class DOMTreeBuilder implements EventHandler $lname = Elements::normalizeSvgElement($lname); } - // See https://github.com/facebook/hhvm/issues/2962 - if (defined('HHVM_VERSION') && ($cid = $this->current->getAttribute('html5-php-fake-id-attribute'))) { - $this->current->removeAttribute('html5-php-fake-id-attribute'); - } else { - $cid = spl_object_hash($this->current); - } + $cid = spl_object_hash($this->current); // XXX: HTML has no parent. What do we do, though, // if this element appears in the wrong place? diff --git a/src/HTML5/Serializer/OutputRules.php b/src/HTML5/Serializer/OutputRules.php index 41616d5..1c4e892 100644 --- a/src/HTML5/Serializer/OutputRules.php +++ b/src/HTML5/Serializer/OutputRules.php @@ -167,9 +167,7 @@ class OutputRules implements RulesInterface $this->outputMode = static::IM_IN_HTML; $this->out = $output; - - // If HHVM, see https://github.com/facebook/hhvm/issues/2727 - $this->hasHTML5 = defined('ENT_HTML5') && !defined('HHVM_VERSION'); + $this->hasHTML5 = defined('ENT_HTML5'); } public function addRule(array $rule) -- cgit v1.2.3