Relax WPCS version constraint to ^3#335
Open
kadamwhite wants to merge 2 commits into
Open
Conversation
PHPCS will be pulled in as a transient dependency of both WPCS and VIPCS, so keeping it in our own composer.json does nothing but increase our maintenance burden. The progressive point updates to WPCS in 3.1, 3.2 and 3.3 have improvements which would benefit HM projects and which make the coding standards more intuitively support modern versions of WordPress.
Member
|
@kadamwhite given we integrated directly with PHP_Codesniffer, it would make sense to have it as a dependency. E.g. https://github.com/humanmade/coding-standards/blob/main/HM/Sniffs/Classes/OnlyClassInFileSniff.php. The reason we specify it is given we have code that relies specifically on certain versions of PHP Codesniffer means we should apply our own version constraint. |
Collaborator
Author
|
@joehoyle what would you recommend for a constraint, WPCS specifies ^3.13.4 |
Member
|
@kadamwhite it depends what we are compatible with, which I dont know. Perhaps it safe to go |
- Our sniffs use standard stable PHPCS API (File, Sniff, Tokens, Config, AbstractSniffUnitTest, Ruleset, etc.) — available since PHPCS 3.0 - Binding floor from our direct deps: WPCS 3.3.0 requires ^3.13.4 - PHPCS 4.x: neither WPCS (^3.13.4) nor VIPCS (^3.9.2) support it, so we can't support it either - Installed: PHPCS 3.13.5
Collaborator
Author
|
@joehoyle Reviewed our custom changes, ^3 feels safe. Since WPCS requires ^3.13 I've gone with that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHPCS will be pulled in as a transient dependency of both WPCS and VIPCS, so keeping it in our own composer.json does nothing but increase our maintenance burden.
The progressive point updates to WPCS in 3.1, 3.2 and 3.3 have improvements which would benefit HM projects and which make the coding standards more intuitively support modern versions of WordPress.