magento / magento/magento-coding-standard

Uncaught Error: Class 'GraphQL\Language\Token' not found in /usr/share/php/PHP/CodeSniffer/src/Files/File.php:556

Open
#196 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Progress: ready for grooming
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.