Skip to content

Commit

Permalink
Merge pull request #164 from Masterminds/drop-hhvm
Browse files Browse the repository at this point in the history
Drop HHVM support
  • Loading branch information
goetas authored Mar 10, 2019
2 parents c961ca6 + d9f7f01 commit c24cd7e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 1 addition & 11 deletions src/HTML5/Parser/DOMTreeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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?
Expand Down
4 changes: 1 addition & 3 deletions src/HTML5/Serializer/OutputRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c24cd7e

Please sign in to comment.