-
Notifications
You must be signed in to change notification settings - Fork 42
PHPCS 3.x compatibility changes #90
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
Merged
Merged
Conversation
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
This commit makes changes necessary for succesffully runnig the WordPressVIPMinimum standard sniffs against both, PHPCS 2.x and 3.x. Due to the project's dependency on the WPCS, it is now loading the backward compatibility code from the upstream repository and enhances it for some missing parts from there. All tests are now also aliasing the `AbstractSniffUnitTest` if needed - when run against PHPCS 3.x.
Since the upstream repositories, both PHPCS and WPCS, have dropped support for PHP 5.2, we should as well.
…tory (WPCS). The modifications contain: * Adding both, VIPCS and WPCS to the PHPCS installed pats config * Running phpunit with loaded AllTests.php from WPCS * Adjusting the paths of XML files which are being linted
…s/PreGetPostsSniff.php sniff
Those changes copy the improvements done in the upstream repository (WPCS).
We'll have to address those issues in near future (in order to be on par with the upstream standards), but it does not feel necessary in terms of making sure the VIPCS supports both PHPCS 2.x and 3.x
/s/botstrap/bootstrap
Fatal error: Class 'WordPress_AbstractArrayAssignmentRestrictionsSniff' not found in /home/travis/build/Automattic/VIP-Coding-Standards/WordPressVIPMinimum/Sniffs/VIP/RegexpCompareSniff.php on line 13
…and WPCS > 0.1.3 (thus the autoloading is not taking effect)
There is no simple path for supporting WPCS prior to 0.1.3
…iff accordingly to the parent theme, as not using one is breaking the identifications of individual sniffs on ruleset.xml level and thus breaking message escallation and overriding.
…tandard. Re-enable the PSR1 Class Declaration sniff for the code style of the project itself.
/s/Actions_PreGetPostsSniff/PreGetPostsSniff/
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.
This commit makes changes necessary for succesffully runnig the WordPressVIPMinimum standard sniffs against both, PHPCS 2.x and 3.x.
Due to the project's dependency on the WPCS, it is now loading the backward compatibility code from the upstream repository and enhances it for some missing parts from there.
All tests are now also aliasing the
AbstractSniffUnitTestif needed - when run against PHPCS 3.x.