Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to PHPCSStandards/PHP_CodeSniffer #315

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Dec 2, 2023

⚠️ This is a DRAFT PR on purpose as it references releases which have not yet been tagged. Once the PHPCS 3.8.0 tag is available (which contains the Composer replace directive), this can/should be merged and released ASAP. ⚠️


Switch to PHPCSStandards/PHP_CodeSniffer

The Squizlabs repo has been abandoned. The project continues in a fork in the PHPCSStandards organisation.

Includes updating the dev required version of the Composer plugin, which should make sure that this repo already switches over to using the PHPCSStandards version of PHPCS.

Ref:

Closes #314

[OPTIONAL] Composer: raise the minimum supported PHPCS version to 3.8.0

... to prevent end-users from running into trouble with the name change.

The files in the Composer vendor/bin will only be replaced when the replace... directive is found and that is only available in the 3.8.0 tag.
When the files in the Composer vendor/bin are not replaced, they will continue to point to the vendor/squizlabs/php_codesniffer directory which will no longer exist, leading to fatal "File not found" errors for end-users trying to run PHPCS/PHPCBF.

Includes updating references to the PHPCS version whenever relevant throughout the codebase.

Note: it should work fine without this change, but may lead to support requests.

Composer: update various version constraints

... after the tooling has also updated to the PHPCSStandards version of PHPCS.

Refs:
* https://github.com/PHPCSStandards/PHPCSDevCS/releases

The Squizlabs repo has been abandoned. The project continues in a fork in the PHPCSStandards organisation.

Ref:
* squizlabs/PHP_CodeSniffer 3932
@jrfnl jrfnl force-pushed the feature/switch-to-fork-of-phpcs branch from 2af5149 to 9c393d3 Compare December 7, 2023 03:14
@jrfnl
Copy link
Collaborator Author

jrfnl commented Dec 7, 2023

Update: The Composer package name will not change, so while this PR should still be merged at your convenience, no new release is needed to unblock end-users, nor does the minimum supported PHPCS version need to change.

@jrfnl jrfnl marked this pull request as ready for review December 7, 2023 03:17
Copy link
Owner

@sirbrillig sirbrillig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you for your efforts!

@sirbrillig sirbrillig merged commit 0270366 into 2.x Dec 7, 2023
56 checks passed
@sirbrillig sirbrillig deleted the feature/switch-to-fork-of-phpcs branch December 7, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

squizlabs/PHP_CodeSniffer is abandoned - Replace with PHPCSStandards/PHP_CodeSniffer when the time is right
2 participants