magento / magento/magento-coding-standard
Uncaught Error: Class 'GraphQL\Language\Token' not found in /usr/share/php/PHP/CodeSniffer/src/Files/File.php:556
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 375
- Forks
- 165
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to reproduce
1. Install phpcs
2. Configure Magento2 coding standard
3. run any module which contains graphql
### Expected result
1.It should run the command and shows the result. But actually, it's giving below error
`PHP Fatal error: Uncaught Error: Class 'GraphQL\Language\Token' not found in /usr/share/php/PHP/CodeSniffer/src/Files/File.php:556
Stack trace:`
### Actual result
1. It should successfully scan code against Magento2 coding standard and return warnings and errors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run PHPCS with the Magento2 coding standard against a module containing GraphQL, then inspect the failure at /usr/share/php/PHP/CodeSniffer/src/Files/File.php:556. Trace why GraphQL\Language\Token is unavailable and confirm that scanning completes with the expected warnings and errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100