Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find any qualified imports when using phpcs 3.5.1 #52

Open
sirbrillig opened this issue Nov 12, 2021 · 0 comments · May be fixed by #53
Open

Cannot find any qualified imports when using phpcs 3.5.1 #52

sirbrillig opened this issue Nov 12, 2021 · 0 comments · May be fixed by #53
Labels
bug Something isn't working

Comments

@sirbrillig
Copy link
Owner

sirbrillig commented Nov 12, 2021

PHP 8 uses T_NAME_QUALIFIED as the token type for symbols like Foo\Bar (previously, each section of an imported symbol appeared as a T_STRING separated by T_NS_SEPARATOR but now it appears that the entire symbol is one token). According to release notes, this was implemented into phpcs as of 3.5.1. There are also T_NAME_FULLY_QUALIFIED, and T_NAME_RELATIVE. The RFC proposal explains it pretty well and you can see the actual tokens listed on the PHP tokens page

As a result, this sniff probably won't work to find imports any more until it can be updated to detect these new tokens and parse them correctly.

@sirbrillig sirbrillig added the bug Something isn't working label Nov 12, 2021
@sirbrillig sirbrillig linked a pull request Nov 12, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant