Skip to content

Update PHP_CodeSniffer to 3.13.5#38

Merged
Macavity merged 2 commits intomasterfrom
feat/update-phpcs
Feb 26, 2026
Merged

Update PHP_CodeSniffer to 3.13.5#38
Macavity merged 2 commits intomasterfrom
feat/update-phpcs

Conversation

@Macavity
Copy link
Contributor

This pull request updates the project to use the PHPCSStandards/PHP_CodeSniffer package instead of squizlabs/PHP_CodeSniffer, and makes related adjustments throughout the codebase. It also updates the Docker image reference and adds initial support for PHP 8.4 in the test matrix.

This closes #34

Dependency and documentation updates:

  • Switched the PHP CodeSniffer dependency from squizlabs/php_codesniffer to phpcsstandards/php_codesniffer in composer.json.
  • Updated all documentation references in README.md from squizlabs/PHP_CodeSniffer to PHPCSStandards/PHP_CodeSniffer, including links and package names. [1] [2]

Build and testing changes:

  • Changed the Docker image tag in the Makefile to use flyeralarm/php-code-validator instead of flyeralarm/php-code-valiator-cli.
  • Added PHP 8.4 to the test matrix in the Makefile's test-all target.

@tolik518
Copy link
Member

I checked the phpcsstandards/php_codesniffer repository and it's a direct fork of squizlabs/php_codesniffer and contains all the old releases as well. Interestingly enough phpcsstandards has squatted the squizlabs package on packagist.

This is the reason we had 3.11.1 in the composer.lock, even though 3.7.2 was the last squizlabs release.

The phpcsstandards package is marked as abandoned on packagist (albeit still updated) https://packagist.org/packages/phpcsstandards/php_codesniffer and redirects to the squizlabs package https://packagist.org/packages/squizlabs/php_codesniffer

In conclusion: looks like we might not need that update as phpcsstandards took over the squizlabs package on packagist. Might also need more research how it's intended to be used now

@Macavity
Copy link
Contributor Author

This is quite the fun roundtrip situation. So the new repository https://github.com/PHPCSStandards/PHP_CodeSniffer - actually provides the code for the old package. I've adjusted to revert the name and only update the content-hash to match the new ones.

@Macavity Macavity changed the title Update PHP_CodeSniffer dependency to PHPCSStandards Update PHP_CodeSniffer to 3.13.5 Feb 26, 2026
@tolik518
Copy link
Member

Yeah that was fun. From my side everything looks good

@Macavity Macavity merged commit 1955205 into master Feb 26, 2026
7 checks passed
@jrfnl
Copy link

jrfnl commented Feb 26, 2026

Might also need more research how it's intended to be used now

The squizlabs/php_codesniffer package is the only one which should be used.

History:

  • Nov 2023: the maintainer of PHP_CodeSniffer abandones the project and refuses to transfer the repo to their right-hand person who has indicated they are willing to take over.
  • Nov 2023: that person (=me) forks the repo and registers a new Packagist name phpcsstandards/php_codesniffer for the package as the expectation is that the Packagist name will not be transferred either.
  • Dec 2023: the abandonment and friendly take-over is announced to the world: The Future of PHP_CodeSniffer squizlabs/PHP_CodeSniffer#3932
  • Dec 2023: a few days later the original maintainer concedes and allows for the new repo to use the original Packagist package name (to save hundred of thousands of projects the trouble of having to update to the new package name).
  • Soon after: the squizlabs/php_codesniffer package is redirected to update from the new repo in the PHPCSStandards organisation.
  • Also soon after: the phpcsstandards/php_codesniffer package name is marked as abandoned in an attempt to prevent people from using it.

Hope that helps clear things up.

@Macavity
Copy link
Contributor Author

No worries, thank you for the clarification @jrfnl - I appreciate that taking over this project must be quite the endeavor.

@tolik518
Copy link
Member

Thanks a lot for the write up @jrfnl!
We (I) were just confused as the repo and the package have different names and the opposite one is marked as deprecated :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

squizlabs PHP CS is abandoned, consider moving to PHPCSStandards/PHP_CodeSniffer

3 participants