Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c18f9bd

Browse filesBrowse files
committed
Remove HHVM compatibility
This PR removes HHVM compatiblity following #22758 It also removes some unneeded comments
1 parent 3bbb657 commit c18f9bd
Copy full SHA for c18f9bd

File tree

Expand file treeCollapse file tree

8 files changed

+5
-28
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+5
-28
lines changed

‎src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function ($key, $value, $isHit) {
6262
*/
6363
public static function create($file, CacheItemPoolInterface $fallbackPool)
6464
{
65-
// Shared memory is available in PHP 7.0+ with OPCache enabled and in HHVM
65+
// Shared memory is available in PHP 7.0+ with OPCache enabled
6666
if (ini_get('opcache.enable')) {
6767
if (!$fallbackPool instanceof AdapterInterface) {
6868
$fallbackPool = new ProxyAdapter($fallbackPool);

‎src/Symfony/Component/Cache/Simple/PhpArrayCache.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Simple/PhpArrayCache.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct($file, CacheInterface $fallbackPool)
4545
*/
4646
public static function create($file, CacheInterface $fallbackPool)
4747
{
48-
// Shared memory is available in PHP 7.0+ with OPCache enabled and in HHVM
48+
// Shared memory is available in PHP 7.0+ with OPCache enabled
4949
if (ini_get('opcache.enable')) {
5050
return new static($file, $fallbackPool);
5151
}

‎src/Symfony/Component/Debug/ErrorHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/ErrorHandler.php
+2-12Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,8 @@ public function handleError($type, $message, $file, $line)
382382

383383
if (4 < $numArgs = func_num_args()) {
384384
$context = $scope ? (func_get_arg(4) ?: array()) : array();
385-
$backtrace = 5 < $numArgs ? func_get_arg(5) : null; // defined on HHVM
386385
} else {
387386
$context = array();
388-
$backtrace = null;
389387
}
390388

391389
if (isset($context['GLOBALS']) && $scope) {
@@ -394,15 +392,6 @@ public function handleError($type, $message, $file, $line)
394392
$context = $e;
395393
}
396394

397-
if (null !== $backtrace && $type & E_ERROR) {
398-
// E_ERROR fatal errors are triggered on HHVM when
399-
// hhvm.error_handling.call_user_handler_on_fatals=1
400-
// which is the way to get their backtrace.
401-
$this->handleFatalError(compact('type', 'message', 'file', 'line', 'backtrace'));
402-
403-
return true;
404-
}
405-
406395
$logMessage = $this->levels[$type].': '.$message;
407396

408397
if (null !== self::$toStringException) {
@@ -436,11 +425,12 @@ public function handleError($type, $message, $file, $line)
436425

437426
// Clean the trace by removing function arguments and the first frames added by the error handler itself.
438427
if ($throw || $this->tracedErrors & $type) {
439-
$backtrace = $backtrace ?: $errorAsException->getTrace();
428+
$backtrace = $errorAsException->getTrace();
440429
$lightTrace = $this->cleanTrace($backtrace, $type, $file, $line, $throw);
441430
$this->traceReflector->setValue($errorAsException, $lightTrace);
442431
} else {
443432
$this->traceReflector->setValue($errorAsException, array());
433+
$backtrace = [];
444434
}
445435
}
446436

‎src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ private function getType(\ReflectionParameter $parameter)
5252
if (!$type = $parameter->getType()) {
5353
return;
5454
}
55-
$typeName = $type->getName();
56-
if ('array' === $typeName && !$type->isBuiltin()) {
57-
// Special case for HHVM with variadics
58-
return;
59-
}
6055

61-
return $typeName;
56+
return $type->getName();
6257
}
6358
}

‎src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/Data/Bundle/Reader/IntlBundleReader.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public function read($path, $locale)
3434
// Never enable fallback. We want to know if a bundle cannot be found
3535
$bundle = new \ResourceBundle($locale, $path, false);
3636
} catch (\Exception $e) {
37-
// HHVM compatibility: constructor throws on invalid resource
3837
$bundle = null;
3938
}
4039

‎src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,6 @@ private function extractFromMutator($class, $property)
177177
}
178178
$type = $this->extractFromReflectionType($reflectionType);
179179

180-
// HHVM reports variadics with "array" but not builtin type hints
181-
if (!$reflectionType->isBuiltin() && Type::BUILTIN_TYPE_ARRAY === $type->getBuiltinType()) {
182-
return;
183-
}
184-
185180
if (in_array($prefix, $this->arrayMutatorPrefixes)) {
186181
$type = new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $type);
187182
}

‎src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Loader/IcuDatFileLoader.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function load($resource, $locale, $domain = 'messages')
3939
try {
4040
$rb = new \ResourceBundle($locale, $resource);
4141
} catch (\Exception $e) {
42-
// HHVM compatibility: constructor throws on invalid resource
4342
$rb = null;
4443
}
4544

‎src/Symfony/Component/Translation/Loader/IcuResFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Loader/IcuResFileLoader.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function load($resource, $locale, $domain = 'messages')
3939
try {
4040
$rb = new \ResourceBundle($locale, $resource);
4141
} catch (\Exception $e) {
42-
// HHVM compatibility: constructor throws on invalid resource
4342
$rb = null;
4443
}
4544

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.