Skip to content

Commit 6ffbbef

Browse files
committed
removed PHP 8.0 stuff
1 parent f5af056 commit 6ffbbef

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/RobotLoader/RobotLoader.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ private function scanPhp(string $file): array
321321
} catch (\ParseError $e) {
322322
if ($this->reportParseErrors) {
323323
$rp = new \ReflectionProperty($e, 'file');
324-
$rp->setAccessible(true);
325324
$rp->setValue($e, $file);
326325
throw $e;
327326
}
@@ -348,9 +347,7 @@ private function scanPhp(string $file): array
348347
case T_CLASS:
349348
case T_INTERFACE:
350349
case T_TRAIT:
351-
case PHP_VERSION_ID < 80100
352-
? T_CLASS
353-
: T_ENUM:
350+
case T_ENUM:
354351
$expected = $token->id;
355352
$name = '';
356353
continue 2;
@@ -503,7 +500,7 @@ private function generateCacheFileName(): string
503500
throw new \LogicException('Set path to temporary directory using setTempDirectory().');
504501
}
505502

506-
return $this->tempDirectory . '/' . hash(PHP_VERSION_ID < 80100 ? 'md5' : 'xxh128', serialize($this->generateCacheKey())) . '.php';
503+
return $this->tempDirectory . '/' . hash('xxh128', serialize($this->generateCacheKey())) . '.php';
507504
}
508505

509506

0 commit comments

Comments
 (0)