Skip to content

Commit

Permalink
compatibility with PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 2, 2021
1 parent 1f7f879 commit 4153697
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0

before_install:
# turn off XDebug
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": ">=5.6.0",
"php": ">=5.6 <8.1",
"ext-tokenizer": "*",
"nette/caching": "~2.2",
"nette/finder": "~2.3",
Expand Down
2 changes: 1 addition & 1 deletion src/RobotLoader/RobotLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ private function scanPhp($code)
case T_WHITESPACE:
continue 2;

case T_NS_SEPARATOR:
case T_STRING:
case PHP_VERSION_ID < 80000 ? T_NS_SEPARATOR : T_NAME_QUALIFIED:
if ($expected) {
$name .= $token[1];
}
Expand Down

0 comments on commit 4153697

Please sign in to comment.