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

before_install:
# turn off XDebug
Expand Down Expand Up @@ -60,6 +61,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": ">=7.1",
"php": ">=7.1 <8.1",
"ext-tokenizer": "*",
"nette/finder": "^2.5 || ^3.0",
"nette/utils": "^3.0"
Expand Down
4 changes: 1 addition & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ RobotLoader is a tool that gives you comfort of automated class loading for your

RobotLoader is incredibly comfortable and addictive!

It requires PHP version 7.1 and supports PHP up to 7.4.

If you like Nette, **[please make a donation now](https://nette.org/donate)**. Thank you!

So we can forget about those famous code blocks:
Expand All @@ -50,7 +48,7 @@ The recommended way to install is via Composer:
composer require nette/robot-loader
```

It requires PHP version 7.1.
It requires PHP version 7.1 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 @@ -338,8 +338,8 @@ private function scanPhp(string $file): array
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 5c2cdff

Please sign in to comment.