Skip to content

Commit ccc2927

Browse files
committed
compatibility with PHP 8.0
1 parent 7b423d1 commit ccc2927

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ php:
55
- 7.1
66
- 7.2
77
- 7.3
8+
- 7.4
9+
- 8.0
810

911
before_install:
1012
# 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/finder": "^2.3 || ^3.0",
2121
"nette/utils": "^2.4 || ^3.0"

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The recommended way to install is via Composer:
4646
composer require nette/robot-loader
4747
```
4848

49-
It requires PHP version 5.6 and supports PHP up to 7.3.
49+
It requires PHP version 5.6 and supports PHP up to 8.0.
5050

5151

5252
Usage

src/RobotLoader/RobotLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ private function scanPhp($code)
297297
case T_WHITESPACE:
298298
continue 2;
299299

300-
case T_NS_SEPARATOR:
301300
case T_STRING:
301+
case PHP_VERSION_ID < 80000 ? T_NS_SEPARATOR : T_NAME_QUALIFIED:
302302
if ($expected) {
303303
$name .= $token[1];
304304
}

0 commit comments

Comments
 (0)