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 #45

Merged
merged 1 commit into from
Oct 11, 2019
Merged

PHPCS/Composer: update PHPCompatibility #45

merged 1 commit into from
Oct 11, 2019

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Sep 1, 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.
  • Use the latest version of the DealerDirect Composer PHPCS plugin.
    Composer treats minors < 1.0 as majors, so you need to explicitly update.

PHPCS ruleset:

  • Actually check for cross-version compatibility.
    You were currently just checking if the code was compatible with PHP 7.1 and just and only PHP 7.1, not with PHP 7.1 and above. This means that the code is not checked for compatibility with PHP 7.2, 7.3 or even the upcoming 7.4.

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.
* Use the latest version of the DealerDirect Composer PHPCS plugin.
    Composer treats minors < 1.0 as majors, so you need to explicitly update.

PHPCS ruleset:
* Actually check for cross-version compatibility.
    You were currently just checking if the code was compatible with PHP 7.1 and just and only PHP 7.1, not with _PHP 7.1 and above_. This means that the code is not checked for compatibility with PHP 7.2, 7.3 or even the upcoming 7.4.

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/releases
@AlexSkrypnyk AlexSkrypnyk merged commit 47eb163 into drevops:master Oct 11, 2019
@AlexSkrypnyk
Copy link
Member

@jrfnl Thank you for your contribution!

@jrfnl jrfnl deleted the feature/update-phpcompatibility branch October 11, 2019 10:42
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.

2 participants