Skip to content

Commit 57464fa

Browse files
committed
Dropping HHVM support
1 parent f55a6c7 commit 57464fa

File tree

4 files changed

+2
-50
lines changed

4 files changed

+2
-50
lines changed

.travis.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@ language: php
22
php:
33
- "5.6"
44
- "7.0"
5-
- "hhvm"
5+
- "7.1"
66

77
before_script:
88
- composer install
9-
109

1110
script:
1211
- bin/phpunit --coverage-text
1312

14-
matrix:
15-
allow_failures:
16-
- php: "hhvm"
1713
branches:
1814
only:
1915
- master

src/Mapping/serialization_hhvm.php

-7
This file was deleted.

src/Mapping/unserialization_hhvm.php

-8
This file was deleted.

src/Serializer.php

+1-30
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ class Serializer
6262
'string' => 'serializeScalar',
6363
];
6464

65-
/**
66-
* @var bool
67-
*/
68-
protected $isHHVM;
69-
7065
/**
7166
* Hack specific serialization classes.
7267
*
@@ -79,16 +74,7 @@ class Serializer
7974
*/
8075
public function __construct(StrategyInterface $strategy)
8176
{
82-
$this->isHHVM = \defined('HHVM_VERSION');
83-
if ($this->isHHVM) {
84-
// @codeCoverageIgnoreStart
85-
$this->serializationMap = \array_merge(
86-
$this->serializationMap,
87-
include \realpath(\dirname(__FILE__).'/Mapping/serialization_hhvm.php')
88-
);
89-
$this->unserializationMapHHVM = include \realpath(\dirname(__FILE__).'/Mapping/unserialization_hhvm.php');
90-
// @codeCoverageIgnoreEnd
91-
}
77+
9278
$this->serializationStrategy = $strategy;
9379
}
9480

@@ -142,12 +128,6 @@ protected function serializeData($value)
142128
{
143129
$this->guardForUnsupportedValues($value);
144130

145-
if ($this->isHHVM && ($value instanceof \DateTimeZone || $value instanceof \DateInterval)) {
146-
// @codeCoverageIgnoreStart
147-
return \call_user_func_array($this->serializationMap[get_class($value)], [$this, $value]);
148-
// @codeCoverageIgnoreEnd
149-
}
150-
151131
if ($this->isInstanceOf($value, 'SplFixedArray')) {
152132
return SplFixedArraySerializer::serialize($this, $value);
153133
}
@@ -313,15 +293,6 @@ protected function unserializeDateTimeFamilyObject(array $value, $className)
313293
$obj = null;
314294

315295
if ($this->isDateTimeFamilyObject($className)) {
316-
if ($this->isHHVM) {
317-
// @codeCoverageIgnoreStart
318-
return \call_user_func_array(
319-
$this->unserializationMapHHVM[$className],
320-
[$this, $className, $value]
321-
);
322-
// @codeCoverageIgnoreEnd
323-
}
324-
325296
$obj = $this->restoreUsingUnserialize($className, $value);
326297
self::$objectMapping[self::$objectMappingIndex++] = $obj;
327298
}

0 commit comments

Comments
 (0)