-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add PHPCompatibilityWP Standard. #81
Merged
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bbe0e3c
Add PHPCompatibilityWP standard. #74
tfrommen 58e1d4d
Undo dependency update and sorting. That's for another PR.
tfrommen ff3bf52
Merge branch 'master' into php-compatibility
roborourke 0da1b36
Merge branch 'master' into php-compatibility
mikeselander aa167c1
Updated CHANGELOG with change
mikeselander a968987
Bump PHPCompatibilityWP version
tfrommen 27adbce
Bump minimum PHP version for compatibility checks
tfrommen af37b36
Merge branch 'master' into php-compatibility
mikeselander ba95fae
Merge branch 'master' into php-compatibility
mikeselander 3945f6f
Remove empty CHANGELOG line
mikeselander File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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 file contains 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 file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the mean time v 2.0.0 has come out.... 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for chiming in, Juliette! (We know! 🙈)
I just bumped the package to
^2.0.0
, and ensured PHP compatibility checks for7.1-
, as PHP 7.1 is currently the minimum version we both advertise and require in various places such ascomposer.json
files and documentation etc.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tfrommen Thanks!
Just read through the complete thread and there are a few things I can add here.
FYI: This statement from above is not really correct:
Overruling a PHPCS
config
setting set within a standard from within a custom ruleset does not work. See this open issue: squizlabs/PHP_CodeSniffer#2197Since PHPCS 3.3.0 - see squizlabs/PHP_CodeSniffer#1821 - you can overrule a
config
setting from the command-line though, which in this case you would do with--runtime-set testVersion 5.6-
to change thetestVersion
for a project to5.6-
(= must be compatible with PHP 5.6 and higher).This kind of command-line addition can, of course, be added to a composer script like:
This is incorrect. PHPCompatibility will find quite some things for which PHP will not throw any fatals or warning, but where you will see different behaviour between PHP versions. Often these things won't be caught by unit tests either unless a unit test was set up specifically to test for it.
Barely. If
PHP_CodeSniffer
is being run anyway, it's only the loading of the rules which will add a second or two, other than that, you will hardly notice it.FYI:
PHPCompatibility
is set up to be highly efficient and will bow out as soon as it can for any given sniff. /cc @nathanielks