magento-coding-standard
magento-coding-standard copied to clipboard
Cannot switch to latest coding standard
Hi!
On Magento 2.4.3, I'm looking to upgrade to latest magento-coding-standard (v25), however, there's a conflict with webonyx/graphql-php.
"require": {
"php": ">=7.3",
"webonyx/graphql-php": "^14.9",
My Magento version is stuck with v0.13.9, so I'm effectively unable to check against up-to-date code styles and stuck with standards v6.
I believe that coding standard should not technically depend on that, and we can safely remove any Magento code version requirements.
Agree?
Hi @unicoder88. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
Having the same issue on version 2.4.3-p2
I think that the issue is that the require
section of this standard contains a lot of things that should be in require-dev
instead.
The standard itself should only require two things:
- Any version of codesniffer that is compatible with it (the requirement must be as loose as possible)
- Compatible versions of PHP
I think that the issue is that the
require
section of this standard contains a lot of things that should be inrequire-dev
instead.
I've checked just now and all the packages listed in require
are used in the standards, not just its tests.
It looks like this is fixed since Magento version 2.4.4.
https://github.com/magento/magento2/blob/2.4.3/composer.json#L82 - "webonyx/graphql-php": "^0.13.8",
https://github.com/magento/magento2/blob/2.4.4/composer.json#L86 - "webonyx/graphql-php": "~14.11.3",
https://github.com/magento/magento2/blob/2.4.5/composer.json#L81 - "webonyx/graphql-php": "~14.11.6",
https://github.com/magento/magento-coding-standard/blob/v25/composer.json#L12 - "webonyx/graphql-php": "^14.9",