Skip to content

Commit fc3e558

Browse files
authored
Bump support to PHP >= 8.0 (#62)
* Version 3.7.0 changelog. * Bump platform PHP to 8.0. * Remove npm travis script. * Set PHP version to 8.0. * Update minimum WordPress version, and set PHP to version 8.0. * Update slevomat coding standards to be PHP 8.0 compat. * Change actions to build PHP 8.0+ * Fix The `set-output` command is deprecated and will be disabled soon. * Update checkout to v3. * Update actions cache to v3.
1 parent 4e092ca commit fc3e558

6 files changed

Lines changed: 16 additions & 14 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
matrix:
2020
operating-system: [ ubuntu-latest ]
21-
php-versions: [ 7.4, 8.0, 8.1 ]
21+
php-versions: [ "8.0", "8.1", "8.2" ]
2222
wp-versions: [ 'latest' ]
2323
coverage: [ true ]
2424
services:
@@ -40,7 +40,7 @@ jobs:
4040
WORDPRESS_DB_USER: wp
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v2
43+
uses: actions/checkout@v3
4444
with:
4545
fetch-depth: 0 # No shallow clone, we need all history!
4646

@@ -57,13 +57,13 @@ jobs:
5757

5858
- name: Get composer cache directory
5959
id: composercache
60-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
60+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
6161

6262
- name: Cache dependencies
63-
uses: actions/cache@v2
63+
uses: actions/cache@v3
6464
with:
6565
path: ${{ steps.composercache.outputs.dir }}
66-
key: php-${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
66+
key: php-${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
6767
restore-keys: ${{ runner.os }}-composer-
6868

6969
- name: Install dependencies

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
# UNRELEASED
88

9+
## 3.7.0 - 2023-02-16
10+
- Set minimum PHP version to 8.0.
11+
912
## 3.6.1 - 2022-08-09
1013
- Add mew `WpSettingsApi::HOOK_INIT_SLUG__S` action hook, which would allow hooks only on current
1114
`getPluginInfo()->getMenuSlug()`.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
},
1919
"optimize-autoloader": true,
2020
"platform": {
21-
"php": "7.4"
21+
"php": "8.0"
2222
},
2323
"sort-packages": true
2424
},
2525
"minimum-stability": "dev",
2626
"require": {
27-
"php": "^7.4 || ^8.0",
27+
"php": "^8.0",
2828
"ext-json": "*",
2929
"thefrosty/wp-utilities": "^2.8"
3030
},
@@ -37,7 +37,7 @@
3737
"phpunit/phpunit": "^9",
3838
"roave/security-advisories": "dev-master",
3939
"roots/wordpress": "~6.1.1",
40-
"slevomat/coding-standard": "~4.0",
40+
"slevomat/coding-standard": "~7.2",
4141
"squizlabs/php_codesniffer": "^3.2",
4242
"wp-phpunit/wp-phpunit": "~6.1.1",
4343
"yoast/phpunit-polyfills": "^1.0.2"

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"name": "wp-settings-api",
3-
"version": "3.2.0",
3+
"version": "3.7.0",
44
"private": true,
55
"author": "Austin Passy <[email protected]>",
66
"scripts": {
7-
"travis": "if [ \"$TRAVIS_COMMIT_RANGE\" ]; then standard $TRAVIS_COMMIT_RANGE; else standard; fi",
87
"eslint": "./vendor/thefrosty/wp-utilities/bin/eslint.sh"
98
},
109
"standard": {

phpcs-ruleset.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<arg name="tab-width" value="4"/>
2323
<!-- For CI, don't fail on warnings -->
2424
<config name="ignore_warnings_on_exit" value="1"/>
25-
<config name="minimum_supported_wp_version" value="5.5" />
25+
<config name="minimum_supported_wp_version" value="6.0" />
2626

2727
<rule ref="Inpsyde">
2828
<exclude name="Inpsyde.CodeQuality.NoAccessors.NoGetter"/>
@@ -44,6 +44,6 @@
4444

4545
<!-- Loads the PHP Compatibility ruleset. -->
4646
<rule ref="PHPCompatibility" />
47-
<!-- Check for cross-version support for PHP 7.4 and higher. -->
48-
<config name="testVersion" value="7.4-"/>
47+
<!-- Check for cross-version support for PHP 8.0 and higher. -->
48+
<config name="testVersion" value="8.0-"/>
4949
</ruleset>

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</php>
1313
<testsuites>
1414
<testsuite name="unit">
15-
<directory phpVersion="7.4" phpVersionOperator=">=" suffix="Test.php">./tests/unit</directory>
15+
<directory phpVersion="8.0" phpVersionOperator=">=" suffix="Test.php">./tests/unit</directory>
1616
</testsuite>
1717
</testsuites>
1818

0 commit comments

Comments
 (0)