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
Merged
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:

- name: Build plugin
run: npm run build

- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
- name: Lint PHP
run: npm run lint:php || true # Ignore for now.

- name: Lint PHP8
run: composer lint-php8
- name: Lint PHP Compatibility
run: composer lint-compat

- name: Start the Docker testing environment
run: npm run env start --xdebug=coverage
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
/npm-debug.log
/vendor/
/dist/
/tests/.phpunit.result.cache
/tests/logs/
/wordpress/
.phpunit.result.cache
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@
"php": ">=5.6"
},
"require-dev": {
"automattic/vipwpcs": "^2.3",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
"automattic/vipwpcs": "^3.0",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"php-coveralls/php-coveralls": "^2.5",
"phpcompatibility/php-compatibility": "10.x-dev as 9.99.99",
"phpcompatibility/phpcompatibility-wp": "dev-master",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"phpunit/phpunit": "^9.5",
"roots/wordpress-core-installer": "^1.100",
"roots/wordpress-full": "~6.0",
"spatie/phpunit-watcher": "^1.23",
"wp-coding-standards/wpcs": "^2.3",
"wp-phpunit/wp-phpunit": "^6.0",
"yoast/phpunit-polyfills": "^1.0"
"wp-coding-standards/wpcs": "^3.1",
"wp-phpunit/wp-phpunit": "~6.0",
"yoast/phpunit-polyfills": "^2.0"
},
"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

"test": "phpunit",
"test:watch": [
"Composer\\Config::disableProcessTimeout",
"phpunit-watcher watch --no-coverage"
Expand Down
Loading
Loading