Skip to content

Commit

Permalink
TASK: Fix PhpAnalyzer for PHP8
Browse files Browse the repository at this point in the history
Fully qualified namespaces emit a `T_NAME_FULLY_QUALIFIED` token in PHP8.
  • Loading branch information
albe authored Jan 3, 2021
1 parent 2579813 commit 3c93473
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Neos.Flow/Classes/Utility/PhpAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ public function extractNamespace(): ?string
if (defined('T_NAME_QUALIFIED') && $type === T_NAME_QUALIFIED) {
return $value;
}
if (defined('T_NAME_FULLY_QUALIFIED') && $type === T_NAME_FULLY_QUALIFIED) {
return ltrim($value, '\\');
}
if ($type === T_STRING) {
$namespaceParts[] = $value;
continue;
Expand Down

0 comments on commit 3c93473

Please sign in to comment.