FIX Support PHP 8 namespace tokens in i18nTextCollector

This commit is contained in:
Garion Herman 2020-09-05 11:13:09 +12:00
parent bad0662291
commit 44685eceba
1 changed files with 7 additions and 0 deletions

View File

@ -570,6 +570,13 @@ class i18nTextCollector
if (is_array($token)) {
list($id, $text) = $token;
// PHP 8 namespace tokens
if (\defined('T_NAME_QUALIFIED') && in_array($id, [T_NAME_FULLY_QUALIFIED, T_NAME_QUALIFIED])) {
$inNamespace = true;
$currentClass[] = $text;
continue;
}
// Check class
if ($id === T_NAMESPACE) {
$inNamespace = true;