Skip to content

Commit eef1f42

Browse files
committed
removed HHVM support
1 parent 15b7cdb commit eef1f42

File tree

9 files changed

+25
-93
lines changed

9 files changed

+25
-93
lines changed

.travis.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,20 @@ before_install:
6262
export -f tfold
6363
6464
# php.ini configuration
65-
if [[ $PHP = hhvm* ]]; then
66-
INI=/etc/hhvm/php.ini
67-
else
68-
INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
69-
phpenv config-rm xdebug.ini || echo "xdebug not available"
70-
fi
65+
INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
66+
phpenv config-rm xdebug.ini || echo "xdebug not available"
7167
echo date.timezone = Europe/Paris >> $INI
7268
echo memory_limit = -1 >> $INI
7369
echo session.gc_probability = 0 >> $INI
7470
echo opcache.enable_cli = 1 >> $INI
75-
echo hhvm.jit = 0 >> $INI
7671
echo apc.enable_cli = 1 >> $INI
7772
echo extension = ldap.so >> $INI
7873
echo extension = redis.so >> $INI
7974
echo extension = memcached.so >> $INI
8075
#echo extension = mongodb.so >> $INI
8176
8277
# Matrix lines for intermediate PHP versions are skipped for pull requests
83-
if [[ ! $deps && ! $PHP = $MIN_PHP && ! $PHP = hhvm* && $TRAVIS_PULL_REQUEST != false ]]; then
78+
if [[ ! $deps && ! $PHP = $MIN_PHP && $TRAVIS_PULL_REQUEST != false ]]; then
8479
deps=skip
8580
skip=1
8681
else
@@ -141,9 +136,7 @@ install:
141136
142137
- if [[ ! $skip ]]; then $COMPOSER_UP; fi
143138
- if [[ ! $skip ]]; then ./phpunit install; fi
144-
- |
145-
# phpinfo
146-
if [[ ! $PHP = hhvm* ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi
139+
- php -i
147140

148141
- |
149142
run_tests () {
@@ -157,8 +150,6 @@ install:
157150
# Test the PhpUnit bridge on PHP 5.3, using the original phpunit script
158151
tfold src/Symfony/Bridge/PhpUnit \
159152
"cd src/Symfony/Bridge/PhpUnit && wget https://phar.phpunit.de/phpunit-4.8.phar && phpenv global 5.3 && composer update --no-progress --ansi && php phpunit-4.8.phar"
160-
elif [[ $PHP = hhvm* ]]; then
161-
$PHPUNIT --exclude-group benchmark,intl-data
162153
else
163154
echo "$COMPONENTS" | parallel --gnu "tfold {} $PHPUNIT_X {}"
164155
tfold tty-group $PHPUNIT --group tty

src/Symfony/Bundle/WebServerBundle/Command/ServerCommand.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,4 @@
2020
*/
2121
abstract class ServerCommand extends Command
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
26-
public function isEnabled()
27-
{
28-
return !defined('HHVM_VERSION') && parent::isEnabled();
29-
}
3023
}

src/Symfony/Component/Serializer/Tests/Normalizer/DataUriNormalizerTest.php

Lines changed: 2 additions & 8 deletions
Large diffs are not rendered by default.

src/Symfony/Component/VarDumper/Caster/RedisCaster.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,6 @@ public static function castRedis(\Redis $c, array $a, Stub $stub, $isNested)
3030
{
3131
$prefix = Caster::PREFIX_VIRTUAL;
3232

33-
if (defined('HHVM_VERSION_ID')) {
34-
if (isset($a[Caster::PREFIX_PROTECTED.'serializer'])) {
35-
$ser = $a[Caster::PREFIX_PROTECTED.'serializer'];
36-
$a[Caster::PREFIX_PROTECTED.'serializer'] = isset(self::$serializer[$ser]) ? new ConstStub(self::$serializer[$ser], $ser) : $ser;
37-
}
38-
39-
return $a;
40-
}
41-
4233
if (!$connected = $c->isConnected()) {
4334
return $a + array(
4435
$prefix.'isConnected' => $connected,

src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public static function castClosure(\Closure $c, array $a, Stub $stub, $isNested,
3636
$prefix = Caster::PREFIX_VIRTUAL;
3737
$c = new \ReflectionFunction($c);
3838

39-
$stub->class = 'Closure'; // HHVM generates unique class names for closures
4039
$a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter);
4140

4241
if (isset($a[$prefix.'parameters'])) {
@@ -214,9 +213,6 @@ public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, arra
214213
self::addExtra($a, $c);
215214
}
216215

217-
// Added by HHVM
218-
unset($a[Caster::PREFIX_DYNAMIC.'static']);
219-
220216
return $a;
221217
}
222218

@@ -231,9 +227,6 @@ public static function castParameter(\ReflectionParameter $c, array $a, Stub $st
231227
{
232228
$prefix = Caster::PREFIX_VIRTUAL;
233229

234-
// Added by HHVM
235-
unset($a['info']);
236-
237230
self::addMap($a, $c, array(
238231
'position' => 'getPosition',
239232
'isVariadic' => 'isVariadic',

src/Symfony/Component/VarDumper/Cloner/VarCloner.php

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -303,23 +303,19 @@ private static function initHashMask()
303303
self::$hashOffset = 16 - PHP_INT_SIZE;
304304
self::$hashMask = -1;
305305

306-
if (defined('HHVM_VERSION')) {
307-
self::$hashOffset += 16;
308-
} else {
309-
// check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below
310-
$obFuncs = array('ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush');
311-
foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) {
312-
if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && in_array($frame['function'], $obFuncs)) {
313-
$frame['line'] = 0;
314-
break;
315-
}
316-
}
317-
if (!empty($frame['line'])) {
318-
ob_start();
319-
debug_zval_dump($obj);
320-
self::$hashMask = (int) substr(ob_get_clean(), 17);
306+
// check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below
307+
$obFuncs = array('ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush');
308+
foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) {
309+
if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && in_array($frame['function'], $obFuncs)) {
310+
$frame['line'] = 0;
311+
break;
321312
}
322313
}
314+
if (!empty($frame['line'])) {
315+
ob_start();
316+
debug_zval_dump($obj);
317+
self::$hashMask = (int) substr(ob_get_clean(), 17);
318+
}
323319

324320
self::$hashMask ^= hexdec(substr(spl_object_hash($obj), self::$hashOffset, PHP_INT_SIZE));
325321
}

src/Symfony/Component/VarDumper/Tests/Caster/RedisCasterTest.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,11 @@ public function testNotConnected()
2626
{
2727
$redis = new \Redis();
2828

29-
if (defined('HHVM_VERSION_ID')) {
30-
$xCast = <<<'EODUMP'
31-
Redis {
32-
#host: ""
33-
%A
34-
}
35-
EODUMP;
36-
} else {
37-
$xCast = <<<'EODUMP'
29+
$xCast = <<<'EODUMP'
3830
Redis {
3931
isConnected: false
4032
}
4133
EODUMP;
42-
}
4334

4435
$this->assertDumpMatchesFormat($xCast, $redis);
4536
}
@@ -52,15 +43,7 @@ public function testConnected()
5243
self::markTestSkipped($e['message']);
5344
}
5445

55-
if (defined('HHVM_VERSION_ID')) {
56-
$xCast = <<<'EODUMP'
57-
Redis {
58-
#host: "127.0.0.1"
59-
%A
60-
}
61-
EODUMP;
62-
} else {
63-
$xCast = <<<'EODUMP'
46+
$xCast = <<<'EODUMP'
6447
Redis {
6548
+"socket": Redis Socket Buffer resource
6649
isConnected: true
@@ -78,7 +61,6 @@ public function testConnected()
7861
}
7962
}
8063
EODUMP;
81-
}
8264

8365
$this->assertDumpMatchesFormat($xCast, $redis);
8466
}

src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public function testGet()
4646
$intMax = PHP_INT_MAX;
4747
$res = (int) $var['res'];
4848

49-
$r = defined('HHVM_VERSION') ? '' : '#%d';
5049
$this->assertStringMatchesFormat(
5150
<<<EOTXT
5251
array:24 [
@@ -74,9 +73,9 @@ public function testGet()
7473
+foo: "foo"
7574
+"bar": "bar"
7675
}
77-
"closure" => Closure {{$r}
76+
"closure" => Closure {#%d
7877
class: "Symfony\Component\VarDumper\Tests\Dumper\CliDumperTest"
79-
this: Symfony\Component\VarDumper\Tests\Dumper\CliDumperTest {{$r} …}
78+
this: Symfony\Component\VarDumper\Tests\Dumper\CliDumperTest {#%d …}
8079
parameters: {
8180
\$a: {}
8281
&\$b: {
@@ -231,10 +230,6 @@ public function testObjectCast()
231230

232231
public function testClosedResource()
233232
{
234-
if (defined('HHVM_VERSION') && HHVM_VERSION_ID < 30600) {
235-
$this->markTestSkipped();
236-
}
237-
238233
$var = fopen(__FILE__, 'r');
239234
fclose($var);
240235

@@ -325,11 +320,10 @@ public function testThrowingCaster()
325320
$dumper->dump($data, $out);
326321
$out = stream_get_contents($out, -1, 0);
327322

328-
$r = defined('HHVM_VERSION') ? '' : '#%d';
329323
$this->assertStringMatchesFormat(
330324
<<<EOTXT
331325
stream resource {@{$ref}
332-
⚠: Symfony\Component\VarDumper\Exception\ThrowingCasterException {{$r}
326+
⚠: Symfony\Component\VarDumper\Exception\ThrowingCasterException {#%d
333327
#message: "Unexpected Exception thrown from a caster: Foobar"
334328
trace: {
335329
%sTwig.php:2: {
@@ -384,10 +378,9 @@ public function testRefsInProperties()
384378
$data = $cloner->cloneVar($var);
385379
$out = $dumper->dump($data, true);
386380

387-
$r = defined('HHVM_VERSION') ? '' : '#%d';
388381
$this->assertStringMatchesFormat(
389382
<<<EOTXT
390-
{{$r}
383+
{#%d
391384
+"foo": &1 "foo"
392385
+"bar": &1 "foo"
393386
}

src/Symfony/Component/VarDumper/Tests/Dumper/HtmlDumperTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public function testGet()
4747
$dumpId = $dumpId[0];
4848
$res = (int) $var['res'];
4949

50-
$r = defined('HHVM_VERSION') ? '' : '<a class=sf-dump-ref>#%d</a>';
5150
$this->assertStringMatchesFormat(
5251
<<<EOTXT
5352
<foo></foo><bar><span class=sf-dump-note>array:24</span> [<samp>
@@ -75,10 +74,10 @@ public function testGet()
7574
+<span class=sf-dump-public title="Public property">foo</span>: "<span class=sf-dump-str title="3 characters">foo</span>"
7675
+"<span class=sf-dump-public title="Runtime added dynamic property">bar</span>": "<span class=sf-dump-str title="3 characters">bar</span>"
7776
</samp>}
78-
"<span class=sf-dump-key>closure</span>" => <span class=sf-dump-note>Closure</span> {{$r}<samp>
77+
"<span class=sf-dump-key>closure</span>" => <span class=sf-dump-note>Closure</span> {<a class=sf-dump-ref>#%d</a><samp>
7978
<span class=sf-dump-meta>class</span>: "<span class=sf-dump-str title="Symfony\Component\VarDumper\Tests\Dumper\HtmlDumperTest
8079
55 characters"><span class="sf-dump-ellipsis sf-dump-ellipsis-class">Symfony\Component\VarDumper\Tests\Dumper</span><span class=sf-dump-ellipsis>\</span>HtmlDumperTest</span>"
81-
<span class=sf-dump-meta>this</span>: <abbr title="Symfony\Component\VarDumper\Tests\Dumper\HtmlDumperTest" class=sf-dump-note>HtmlDumperTest</abbr> {{$r} &%s;}
80+
<span class=sf-dump-meta>this</span>: <abbr title="Symfony\Component\VarDumper\Tests\Dumper\HtmlDumperTest" class=sf-dump-note>HtmlDumperTest</abbr> {<a class=sf-dump-ref>#%d</a> &%s;}
8281
<span class=sf-dump-meta>parameters</span>: {<samp>
8382
<span class=sf-dump-meta>\$a</span>: {}
8483
<span class=sf-dump-meta>&amp;\$b</span>: {<samp>

0 commit comments

Comments
 (0)