diff options
author | Asmir Mustafic <[email protected]> | 2019-03-10 13:02:28 +0100 |
---|---|---|
committer | Asmir Mustafic <[email protected]> | 2019-03-10 13:02:28 +0100 |
commit | 707c2ff7b7ccbc1ebfabbde12ef92e2dce47714c (patch) | |
tree | 5a96a4d03b60e69f765a0db66b8c6c02d34b37b6 | |
parent | c961ca6a0a81dc6b55b6859b3f9ea7f402edf9ad (diff) |
drop hhvm support
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/HTML5/Parser/DOMTreeBuilder.php | 12 | ||||
-rw-r--r-- | src/HTML5/Serializer/OutputRules.php | 4 |
4 files changed, 3 insertions, 16 deletions
diff --git a/.travis.yml b/.travis.yml index f10bcf3..36fabd1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ matrix: env: CS_FIXER=1 - php: 7.2 env: BENCHMARK=1 - - php: hhvm fast_finish: true cache: @@ -12,7 +12,7 @@ HTML5 provides the following features. - Event-based (SAX-like) parser - A DOM tree builder - Interoperability with [QueryPath](https://github.com/technosophos/querypath) -- Runs on **PHP** 5.3.0 or newer and **HHVM** 3.2 or newer +- Runs on **PHP** 5.3.0 or newer [![Build Status](https://travis-ci.org/Masterminds/html5-php.png?branch=master)](https://travis-ci.org/Masterminds/html5-php) [![Latest Stable Version](https://poser.pugx.org/masterminds/html5/v/stable.png)](https://packagist.org/packages/masterminds/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) |