You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the PHPCompatibility develop branch (I ran on 335cd6b) the following class fails with an error. Looks like it's not processing correctly import my own "use".
./vendor/bin/phpcs -p --colors --extensions=php --standard=PHPCompatibility --runtime-set testVersion 7.3-7.4 test/
E 1 / 1 (100%)
FILE: /var/www/html/test/test.php
----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------
14 | ERROR | The built-in class Attribute is not present in PHP version 7.4 or earlier
----------------------------------------------------------------------------------------
Time: 45ms; Memory: 12MB
The text was updated successfully, but these errors were encountered:
@ihor-sviziev Thanks for reporting this. This is actually a known issue. The intention is to solve this somewhere in the 10.x series, but the priority is now first on getting 10.0.0 out of the door. It is on my radar however.
jrfnl
changed the title
[False positive] The built-in class Attribute is not present in PHP version 7.4 or earlier
Import use statements are not taken into account when checking names against lists
Jul 29, 2021
@ihor-sviziev When it's ready 😔 (see various other discussions about this in the issues)
In the mean time, feel free to use the develop branch, it's pretty stable, but not all sniffs have been updated yet for the humongous amount of new PHP syntaxes which have been added.
On the PHPCompatibility develop branch (I ran on 335cd6b) the following class fails with an error. Looks like it's not processing correctly import my own "use".
My test code looks like this:
How I tested:
The text was updated successfully, but these errors were encountered: