- Issue created by @Charlie ChX Negyesi
- π¦πΊAustralia thtas
Upgrading to 1.4.0 solves the problem
Version 1.4.0 of which package?
- π¦πΉAustria klausi π¦πΉ Vienna
Started at https://github.com/pfrenssen/coder/pull/264
- π¦πΉAustria klausi π¦πΉ Vienna
This is ready for review now. We are preserving backwards compatibility by keeping the sniffs but deprecating them.
I also added a sentence to the Coder project page: "Note that CSS support has been removed. To check and fix CSS files please use Stylelint and use the Drupal core .stylelintrc.json configuration file."
Let me know if you see any problem with this approach!
- π¬π§United Kingdom marcelovani London
Thanks for the initiative. I tested the PR and still see some deprecations:
Drupal.CSS.ClassDefinitionNameSpacing
This sniff has been deprecated since Coder 8.3.30 and will be removed in Coder 9.0.0. Checking CSS coding standards
is not supported anymore, use Stylelint instead with the Drupal core .stylelintrc.json configuration file.
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/.stylelintrc....
- Drupal.CSS.ColourDefinition
This sniff has been deprecated since Coder 8.3.30 and will be removed in Coder 9.0.0. Checking CSS coding standards
is not supported anymore, use Stylelint instead with the Drupal core .stylelintrc.json configuration file.
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/.stylelintrc....
- Drupal.Strings.UnnecessaryStringConcat
This sniff has been deprecated since Coder 8.3.30 and will be removed in Coder 9.0.0. The custom
UnnecessaryStringConcatSniff is deprecated and will be removed in Coder 9.0.0. Use
Generic.Strings.UnnecessaryStringConcat instead. - π¦πΉAustria klausi π¦πΉ Vienna
Thanks for testing!
Do you have those sniffs enabled in your phpcs.xml config file? If yes then the deprecations make sense. How do you invoke phpcs?
- First commit to issue fork.
- π¬π§United Kingdom marcelovani London
@Klauysi I don't have phpcs.xml.
I am running it with this command
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,info,txt,md --ignore=node_modules,bower_components,vendor -s --colors --report-width=120 --report-junit=junit.xml --report-full --report-summary --report-source web/modules/custom
- π¦πΉAustria klausi π¦πΉ Vienna
I see, and is your global "phpcs" command pointing to the dev version of your Coder install?
What does "which phpcs" return? Is it the path where you installed Coder 8.3.x from git and PHPCS with it in the vendor directory?
- π¬π§United Kingdom marcelovani London
PHPCS is in vendor/bin folder.
I checked out the repo of coder manually to run the tests.
Here is the info about php_codesniffer
composer show squizlabs/php_codesniffer name : squizlabs/php_codesniffer descrip. : PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards. keywords : phpcs, standards, static analysis versions : * 3.13.0 released : 2025-05-11, last week type : library license : BSD 3-Clause "New" or "Revised" License (BSD-3-Clause) (OSI approved) https://spdx.org/licenses/BSD-3-Clause.html#licenseText homepage : https://github.com/PHPCSStandards/PHP_CodeSniffer source : [git] https://github.com/PHPCSStandards/PHP_CodeSniffer.git 65ff2489553b83b4597e89c3b8b721487011d186 dist : [zip] https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/65ff2489553b83b4597e89c3b8b721487011d186 65ff2489553b83b4597e89c3b8b721487011d186 path : /Users/marcelovani/Development/LegalConnection/Drupal/legal_connection_headless_drupal/vendor/squizlabs/php_codesniffer names : squizlabs/php_codesniffer support issues : https://github.com/PHPCSStandards/PHP_CodeSniffer/issues security : https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy source : https://github.com/PHPCSStandards/PHP_CodeSniffer wiki : https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki requires ext-simplexml * ext-tokenizer * ext-xmlwriter * php >=5.4.0 requires (dev) phpunit/phpunit ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4
- π¦πΉAustria klausi π¦πΉ Vienna
Thanks, did some manual test runs myself and realized we cannot implement DeprecatedSniff. The problem is that we cannot silence the deprecation from our ruleset.xml file. That means all users will always get the deprecated message which they cannot fix.
My workaround is now to just make the deprecated sniffs empty so that they don't check anything anymore. Not great, but at least it will not break the CI pipelines for people that still reference those sniffs in their config.
I updated the issue summary with instructions for the release notes.
-
klausi β
authored dd576471 on 8.3.x
fix(phpcs): Remove support for CSS and JS files, remove deprecated...
-
klausi β
authored dd576471 on 8.3.x
- π¦πΉAustria klausi π¦πΉ Vienna
Alright, merged that now. Thank you all!
- π¬π§United Kingdom jonathan1055
Should the 3524264-deprecate-all-css branch be hidden in the summary? Given that work is done via Pull Requests it can be confusing to see a gitlab issue fork here, as those are not the changes.
- π¦πΉAustria klausi π¦πΉ Vienna
klausi β changed the visibility of the branch 3524264-deprecate-all-css to hidden.
- π¦πΉAustria klausi π¦πΉ Vienna
Yeah, I set it to hidden. Also added the PR link in the issue summary.
- π¬π§United Kingdom jonathan1055
Thank you.
I may have asked this before, but have we investigated a way to stop issue forks being created here? It would help to save effort, both from the developer who starts off work that won't be used, and for later support explaining the workflow, and tidy-up.