Skip to content

Commit bfb0ac5

Browse files
committed
compatibility with PHP 8.0
1 parent 37941e5 commit bfb0ac5

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
@@ -6,6 +6,7 @@ php:
66
- 7.2
77
- 7.3
88
- 7.4
9+
- 8.0snapshot
910

1011
before_install:
1112
# turn off XDebug
@@ -66,6 +67,7 @@ jobs:
6667
allow_failures:
6768
- stage: Static Analysis (informative)
6869
- stage: Code Coverage
70+
- php: nightly
6971

7072

7173
sudo: false

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
@@ -48,7 +48,7 @@ The recommended way to install is via Composer:
4848
composer require nette/robot-loader
4949
```
5050

51-
It requires PHP version 5.6 and supports PHP up to 7.4.
51+
It requires PHP version 5.6 and supports PHP up to 8.0.
5252

5353

5454
Usage

src/RobotLoader/RobotLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ private function scanPhp($file)
343343
case T_WHITESPACE:
344344
continue 2;
345345

346-
case T_NS_SEPARATOR:
347346
case T_STRING:
347+
case PHP_VERSION_ID < 80000 ? T_NS_SEPARATOR : T_NAME_QUALIFIED:
348348
if ($expected) {
349349
$name .= $token[1];
350350
}

0 commit comments

Comments
 (0)