diff --git a/.travis.yml b/.travis.yml index f10bcf3..469dc22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,8 @@ matrix: - php: 7.1 env: CS_FIXER=1 - php: 7.2 + - php: 7.3 env: BENCHMARK=1 - - php: hhvm fast_finish: true cache: diff --git a/README.md b/README.md index ef24737..546d3e2 100644 --- a/README.md +++ b/README.md @@ -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 @@ public function startTag($name, $attributes = array(), $selfClosing = false) // 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 @@ public function endTag($name) $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 @@ public function __construct($output, $options = array()) $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)