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

PHPCS/Composer: update PHPCompatibility #26

Merged
merged 1 commit into from
Sep 2, 2019
Merged

PHPCS/Composer: update PHPCompatibility #26

merged 1 commit into from
Sep 2, 2019

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Sep 2, 2019

Composer:

  • wimg/php-compatibility has been abandoned for nearly a year. Use phpcompatibility/php-compatibility instead.
  • Use the latest version of PHPCompatibility.
    You were missing out on a lot of new checks, including the checks to make sure your code is compatible with the upcoming PHP 7.4.
  • Add the DealerDirect Composer PHPCS plugin.
    This plugin will handle setting the PHPCS installed_paths automatically.
    This also allows for referencing the ruleset by name instead of via the path in the ruleset, which is generally more stable.

PHPCS ruleset:

  • Rename the ruleset to phpcs.xml.dist which will allow PHPCS to automatically pick up on it.
    No need to pass the --standard=... command-line argument anymore.
    Includes removing the argument from the Travis script.
  • Check for cross-version compatibility for the PHP versions officially supported.
    According to the composer.json file, this code should be compatible with PHP 5.6 and above.
    PHPCompatibility was checking against PHP 5.5 up to PHP 7.1.
    The new testVersion actually checks against PHP 5.6 up to the latest version (upcoming 7.4 at this moment).

Refs:

Composer:
* `wimg/php-compatibility` has been abandoned for nearly a year. Use `phpcompatibility/php-compatibility` instead.
* Use the latest version of PHPCompatibility.
    You were missing out on a lot of new checks, including the checks to make sure your code is compatible with the upcoming PHP 7.4.
* Add the DealerDirect Composer PHPCS plugin.
    This plugin will handle setting the PHPCS `installed_paths` automatically.
    This also allows for referencing the ruleset by name instead of via the path in the ruleset, which is generally more stable.

PHPCS ruleset:
* Rename the ruleset to `phpcs.xml.dist` which will allow PHPCS to automatically pick up on it.
    No need to pass the `--standard=...` command-line argument anymore.
    Includes removing the argument from the Travis script.
* Check for cross-version compatibility for the PHP versions officially supported.
    According to the `composer.json` file, this code should be compatible with PHP 5.6 and above.
    PHPCompatibility _was_ checking against PHP 5.5 up to PHP 7.1.
    The new `testVersion` actually checks against PHP 5.6 up to the latest version (upcoming 7.4 at this moment).

Refs:
* https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions
* https://github.com/PHPCompatibility/PHPCompatibility/releases/
* https://github.com/Dealerdirect/phpcodesniffer-composer-installer
@codecov-io
Copy link

codecov-io commented Sep 2, 2019

Codecov Report

Merging #26 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #26   +/-   ##
=========================================
  Coverage     99.59%   99.59%           
  Complexity      267      267           
=========================================
  Files            19       19           
  Lines           741      741           
=========================================
  Hits            738      738           
  Misses            3        3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1fc38e...86a9c40. Read the comment docs.

@Bukashk0zzz
Copy link
Owner

@jrfnl Thank you for PR.

@Bukashk0zzz Bukashk0zzz merged commit abb6bd1 into Bukashk0zzz:master Sep 2, 2019
@jrfnl jrfnl deleted the feature/update-phpcompatibility branch September 2, 2019 10:21
@jrfnl
Copy link
Contributor Author

jrfnl commented Sep 2, 2019

@Bukashk0zzz You're welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants