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

Ensure PHP 5.6+ support during CI to avoid breaking changes #605

Merged
merged 10 commits into from Apr 25, 2024

Conversation

kasparsd
Copy link
Collaborator

@kasparsd kasparsd commented Apr 25, 2024

What?

  • Enable PHP compatibility linter that ensures all plugin code is compatible with PHP 5.6 or later. That's until we bump the required version of PHP.
  • Bump development specific dependencies to the latest versions.

Why?

This now would catch issues like #604:

trailing-comma

How?

Testing Instructions

Screenshots or screencast

Changelog Entry

composer.json Outdated
},
"scripts": {
"lint": "phpcs",
"lint-php8": "phpcs -p --standard=PHPCompatibilityWP --runtime-set testVersion 8.0- --extensions=php --ignore='vendor/,wordpress/,node_modules/' .",
"test": "php -d xdebug.mode=coverage vendor/bin/phpunit",
"lint-compat": "phpcs -p --standard=PHPCompatibilityWP --runtime-set testVersion 5.6- --extensions=php --ignore='tests/,includes/Yubico/,vendor/,wordpress/,node_modules/' .",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Skipping checks on U2F helpers since those will be removed soon and they currently report the following warnings for PHP 8.4:

FILE: includes/Yubico/U2F.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
 504 | WARNING | Implicitly marking a parameter as nullable is deprecated since PHP 8.4. Update the type to be explicitly
     |         | nullable instead. Found implicitly nullable parameter: $previous.
--------------------------------------------------------------------------------------------------------------------------------

Time: 1.88 secs; Memory: 24MB

@kasparsd kasparsd changed the title Ling for PHP 5.6+ support during CI to avoid breaking changes. Ensure PHP 5.6+ support during CI to avoid breaking changes Apr 25, 2024
@kasparsd kasparsd merged commit 7d543ca into master Apr 25, 2024
2 checks passed
@kasparsd kasparsd deleted the fix-lint-php7 branch April 25, 2024 19:56
@jeffpaul jeffpaul added this to the 0.9.1 milestone May 8, 2024
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

2 participants