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

Ruleset: add the PHPCompatibilityWP standard #177

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Sep 23, 2018

This currently presumes that all themes should be compatible with PHP 5.2-nightly.

At a later point in time, we may be able to make this more configurable by reading out the Requires PHP: header in the style.css file and, if found, using the minimum PHP version set there for the bottom limit in testVersion.

For now, the testVersion as set in the ruleset can be overruled from the command-line by passing a testVersion as a command-line parameter, like so: phpcs ... --runtime-set testVersion 5.4-.

Fixes #173

This currently presumes that all themes should be compatible with PHP 5.2-nightly.

At a later point in time, we may be able to make this more configurable by reading out the `Requires PHP:` header in the `style.css` file and, if found, using the minimum PHP version set there for the bottom limit in `testVersion`.

For now, the `testVersion` as set in the ruleset can be overruled from the command-line by passing a `testVersion` as a command-line parameter, like so: `phpcs ... --runtime-set testVersion 5.4-`.

Fixes 173
Copy link
Member

@dingo-d dingo-d left a comment

Choose a reason for hiding this comment

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

I've tested this and it catches the deprecated functions, so it's good to merge.

@jrfnl jrfnl merged commit 787b28b into develop Oct 8, 2018
@jrfnl jrfnl deleted the feature/173-add-phpcompatibility-wp branch October 8, 2018 00:11
@jrfnl jrfnl added this to the 0.1.0 milestone Oct 8, 2018
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