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 Nov 6, 2020
1 parent 37941e5 commit bfb0ac5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ php:
- 7.2
- 7.3
- 7.4
- 8.0snapshot

before_install:
# turn off XDebug
Expand Down Expand Up @@ -66,6 +67,7 @@ jobs:
allow_failures:
- stage: Static Analysis (informative)
- stage: Code Coverage
- php: nightly


sudo: false
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/finder": "^2.3 || ^3.0",
"nette/utils": "^2.4 || ^3.0"
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The recommended way to install is via Composer:
composer require nette/robot-loader
```

It requires PHP version 5.6 and supports PHP up to 7.4.
It requires PHP version 5.6 and supports PHP up to 8.0.


Usage
Expand Down
2 changes: 1 addition & 1 deletion src/RobotLoader/RobotLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ private function scanPhp($file)
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 bfb0ac5

Please sign in to comment.