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 #214

Merged
merged 3 commits into from
Dec 8, 2023

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Dec 1, 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.

Proposed Changes

Switch to PHPCSStandards/PHP_CodeSniffer

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

Note: I'm not changing the version constraints. All tags since 2.0.0 have been recreated in the PHPCSStandards fork, though the package name in those tags has not been changed.

Based on tests I've run, the package should install fine when old tags are requested, though if a user has a composer.json which also includes squizlabs/php_codesniffer in their dependency chain, this means that both will be installed, which could lead to issues.

I recommend tagging a release straight-away. This should then allow our dependencies to update their own requirements and version constraints and to release once PHPCS 3.8.0 has been tagged, to prevent these type of problems.

Ref:

Tests/PHPCSVersions: add PHPCS 3.7.2/3.8.0 to the mix

Refs:

Revert changes to the Composer package name

In contrast to earlier information, arrangements are now being made to allow the package to continue under its original name on Packagist. The commit (in the new repo) to rename the package has been reverted.

@jrfnl jrfnl added this to the 1.x Next Release milestone Dec 1, 2023
@jrfnl jrfnl force-pushed the feature/switch-to-fork-of-phpcs branch from 4a5abb6 to 438de24 Compare December 1, 2023 21:16
Potherca
Potherca previously approved these changes Dec 3, 2023
Copy link
Member

@Potherca Potherca left a comment

Choose a reason for hiding this comment

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

image

jrfnl added 2 commits December 3, 2023 21:13
The Squizlabs repo has been abandoned. The project continues in a fork in the PHPCSStandards organisation.

Note: I'm not changing the version constraints. All tags since 2.0.0 have been recreated in the PHPCSStandards fork, though the package name in those tags has not been changed.

Based on tests I've run, the package should install fine when old tags are requested, though if a user has a `composer.json` which _also_ includes `squizlabs/php_codesniffer` in their dependency chain, this means that both will be installed, which could lead to issues.

I recommend tagging a release straight-away. This should then allow _our_ dependencies to update their own requirements and version constraints and to release once PHPCS 3.8.0 has been tagged, to prevent these type of problems.

Ref:
* squizlabs/PHP_CodeSniffer#3932
@jrfnl jrfnl force-pushed the feature/switch-to-fork-of-phpcs branch from 438de24 to 626984e Compare December 3, 2023 20:14
Potherca
Potherca previously approved these changes Dec 4, 2023
In contrast to earlier information, arrangements are now being made to allow the package to continue under its original name on Packagist. The commit (in the new repo) to rename the package [has been reverted](PHPCSStandards/PHP_CodeSniffer#135).
@jrfnl jrfnl marked this pull request as ready for review December 7, 2023 01:17
@jrfnl
Copy link
Member Author

jrfnl commented Dec 7, 2023

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

@jrfnl jrfnl marked this pull request as draft December 7, 2023 01:21
@jrfnl jrfnl marked this pull request as ready for review December 8, 2023 13:36
@jrfnl
Copy link
Member Author

jrfnl commented Dec 8, 2023

PHPCS 3.8.0 has just been released.

I've re-retriggered the build and if it passes, I will merge this PR.

@jrfnl jrfnl merged commit 290bcb6 into main Dec 8, 2023
102 checks passed
@jrfnl jrfnl deleted the feature/switch-to-fork-of-phpcs branch December 8, 2023 15:09
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.

2 participants