-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from 10up/feature/add-php-checks
Add a check to ensure we have a valid PHP version before loading plugin functionality and output an admin notice f needed
- Loading branch information
Showing
5 changed files
with
639 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: PHP Compatibility | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
php-compatibility: | ||
name: PHP minimum 7.4 | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set PHP version | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run PHP Compatibility on all files. | ||
run: vendor/bin/phpcs includes --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4- | ||
|
||
- name: Run PHP Compatibility on main file. | ||
run: vendor/bin/phpcs insecure-content-warning.php --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 5.6- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,5 @@ Desktop.ini | |
|
||
tests/cypress/screenshots/ | ||
tests/cypress/videos/ | ||
|
||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "10up/insecure-content-warning", | ||
"description": "Prevent editors from adding insecure content in the editor.", | ||
"type": "wordpress-plugin", | ||
"homepage": "https://github.com/10up/insecure-content-warning", | ||
"license": "GPL-2.0-only", | ||
"authors": [ | ||
{ | ||
"name": "10up", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require-dev": { | ||
"10up/phpcs-composer": "dev-master" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"dealerdirect/phpcodesniffer-composer-installer": true | ||
} | ||
} | ||
} |
Oops, something went wrong.