Skip to content

Commit

Permalink
Merge pull request #605 from WordPress/fix-lint-php7
Browse files Browse the repository at this point in the history
Ensure PHP 5.6+ support during CI to avoid breaking changes
  • Loading branch information
kasparsd authored Apr 25, 2024
2 parents 5ec52bb + c385383 commit 7d543ca
Show file tree
Hide file tree
Showing 5 changed files with 612 additions and 454 deletions.
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/,dist/,includes/Yubico/,vendor/,wordpress/,node_modules/' .",
"test": "phpunit",
"test:watch": [
"Composer\\Config::disableProcessTimeout",
"phpunit-watcher watch --no-coverage"
Expand Down
Loading

0 comments on commit 7d543ca

Please sign in to comment.