- Issue created by @joachim
I'm trying to upgrade test code for PHPUnit 10 attribures, and the Rector rule (Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_100) works great, but leaves fully-qualified class names.
So I'm trying to use the Drupal.Classes.FullyQualifiedNamespace sniff as a second step, but it's not picking up classes in attributes.
I think the problem is here maybe:
if ($tokens[($stackPtr - 1)]['code'] !== T_STRING || $tokens[($stackPtr + 1)]['code'] !== T_STRING) {
but I'm not sure, as doing a dump($tokens) before this gets me a list of tokens that look like AFTER the changes have been made to classnames it does find!
I'm confused by tokens like this in the attribute classname:
49 => array:11 [
"code" => 262 <-- that's not the value of T_STRING, which is 313.
"type" => "T_STRING" <-- but that says T_STRING!
"content" => "PHPUnit"
"line" => 11
"column" => 4
"length" => 7
"attribute_opener" => 47
"attribute_closer" => 59
"level" => 0
"conditions" => []
"nested_attributes" => array:1 [
47 => 59
]
]
Active
8.3
Review/Rules