Skip to content

Commit 4153697

Browse files
committed
compatibility with PHP 8.0
1 parent 1f7f879 commit 4153697

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ php:
44
- 7.0
55
- 7.1
66
- 7.2
7+
- 7.3
8+
- 7.4
9+
- 8.0
710

811
before_install:
912
# turn off XDebug

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=5.6.0",
18+
"php": ">=5.6 <8.1",
1919
"ext-tokenizer": "*",
2020
"nette/caching": "~2.2",
2121
"nette/finder": "~2.3",

src/RobotLoader/RobotLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ private function scanPhp($code)
288288
case T_WHITESPACE:
289289
continue 2;
290290

291-
case T_NS_SEPARATOR:
292291
case T_STRING:
292+
case PHP_VERSION_ID < 80000 ? T_NS_SEPARATOR : T_NAME_QUALIFIED:
293293
if ($expected) {
294294
$name .= $token[1];
295295
}

0 commit comments

Comments
 (0)