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 & raise minimum supported version #523

Merged
merged 3 commits into from Dec 8, 2023

Conversation

jrfnl
Copy link
Member

@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.

Ref:

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.

Update: The Composer package name will not change, so while this PR should still be merged at our convenience (after the 3.8.0 release, expected this Friday), we will not need to do a release to unblock end-users, only because we actually have changes which are useful for end-users.

Remove work-arounds which were in place for PHPCS < 3.8.0

@jrfnl jrfnl added this to the 1.0.9 milestone Dec 2, 2023
@jrfnl jrfnl force-pushed the feature/switch-to-fork-of-phpcs branch 3 times, most recently from dba98a4 to a35a07e Compare December 7, 2023 02:18
The Squizlabs repo has been abandoned. The project continues in a fork in the PHPCSStandards organisation.

Ref:
* squizlabs/PHP_CodeSniffer 3932
... 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.
@jrfnl jrfnl force-pushed the feature/switch-to-fork-of-phpcs branch from a35a07e to 2f73b96 Compare December 7, 2023 04:11
@jrfnl jrfnl marked this pull request as ready for review December 8, 2023 13:47
@jrfnl jrfnl merged commit 5cd5676 into develop Dec 8, 2023
57 checks passed
@jrfnl jrfnl deleted the feature/switch-to-fork-of-phpcs branch December 8, 2023 13:50
@jrfnl
Copy link
Member Author

jrfnl commented Dec 8, 2023

@jrfnl jrfnl mentioned this pull request Dec 8, 2023
14 tasks
@jrfnl jrfnl mentioned this pull request Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant