Skip to content

Commit c24cd7e

Browse files
authored
Merge pull request #164 from Masterminds/drop-hhvm
Drop HHVM support
2 parents c961ca6 + d9f7f01 commit c24cd7e

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ matrix:
1616
- php: 7.1
1717
env: CS_FIXER=1
1818
- php: 7.2
19+
- php: 7.3
1920
env: BENCHMARK=1
20-
- php: hhvm
2121
fast_finish: true
2222

2323
cache:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ HTML5 provides the following features.
1212
- Event-based (SAX-like) parser
1313
- A DOM tree builder
1414
- Interoperability with [QueryPath](https://github.com/technosophos/querypath)
15-
- Runs on **PHP** 5.3.0 or newer and **HHVM** 3.2 or newer
15+
- Runs on **PHP** 5.3.0 or newer
1616

1717
[![Build Status](https://travis-ci.org/Masterminds/html5-php.png?branch=master)](https://travis-ci.org/Masterminds/html5-php)
1818
[![Latest Stable Version](https://poser.pugx.org/masterminds/html5/v/stable.png)](https://packagist.org/packages/masterminds/html5)

src/HTML5/Parser/DOMTreeBuilder.php

+1-11
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,6 @@ public function startTag($name, $attributes = array(), $selfClosing = false)
391391
// to avoid spl_object_hash collisions whe have to avoid garbage collection of $ele storing it into $pushes
392392
// see https://bugs.php.net/bug.php?id=67459
393393
$this->pushes[spl_object_hash($ele)] = array($pushes, $ele);
394-
395-
// SEE https://github.com/facebook/hhvm/issues/2962
396-
if (defined('HHVM_VERSION')) {
397-
$ele->setAttribute('html5-php-fake-id-attribute', spl_object_hash($ele));
398-
}
399394
}
400395

401396
foreach ($attributes as $aName => $aVal) {
@@ -509,12 +504,7 @@ public function endTag($name)
509504
$lname = Elements::normalizeSvgElement($lname);
510505
}
511506

512-
// See https://github.com/facebook/hhvm/issues/2962
513-
if (defined('HHVM_VERSION') && ($cid = $this->current->getAttribute('html5-php-fake-id-attribute'))) {
514-
$this->current->removeAttribute('html5-php-fake-id-attribute');
515-
} else {
516-
$cid = spl_object_hash($this->current);
517-
}
507+
$cid = spl_object_hash($this->current);
518508

519509
// XXX: HTML has no parent. What do we do, though,
520510
// if this element appears in the wrong place?

src/HTML5/Serializer/OutputRules.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ public function __construct($output, $options = array())
167167

168168
$this->outputMode = static::IM_IN_HTML;
169169
$this->out = $output;
170-
171-
// If HHVM, see https://github.com/facebook/hhvm/issues/2727
172-
$this->hasHTML5 = defined('ENT_HTML5') && !defined('HHVM_VERSION');
170+
$this->hasHTML5 = defined('ENT_HTML5');
173171
}
174172

175173
public function addRule(array $rule)

0 commit comments

Comments
 (0)