Skip to content

Commit ca94a68

Browse files
committed
Increase minimum WP and PHP supported versions
1 parent 0c521cb commit ca94a68

File tree

6 files changed

+44
-47
lines changed

6 files changed

+44
-47
lines changed

.github/workflows/cs-lint.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121

2222
strategy:
2323
matrix:
24-
php: ['7.1', '8.1']
24+
php: ['7.4', '8.2']
2525
experimental: [false]
2626
include:
27-
- php: '8.2'
27+
- php: '8.3'
2828
experimental: true
2929
fail-fast: false
3030

@@ -54,23 +54,16 @@ jobs:
5454
# Install dependencies and handle caching in one go.
5555
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
5656
- name: Install Composer dependencies
57-
if: ${{ matrix.php < 8.2 }}
5857
uses: ramsey/composer-install@v2
5958

60-
- name: Install Composer dependencies for PHP >= 8.2
61-
if: ${{ matrix.php >= 8.2 }}
62-
uses: ramsey/composer-install@v2
63-
with:
64-
composer-options: --ignore-platform-reqs
65-
6659
# Lint PHP.
6760
- name: Lint PHP against parse errors
6861
run: composer lint-ci --no-interaction | cs2pr
6962

7063
# Needed as runs-on: system doesn't have xml-lint by default.
7164
# @link https://github.com/marketplace/actions/xml-lint
7265
- name: Lint phpunit.xml.dist
73-
if: ${{ matrix.php >= 7.3 }}
66+
if: ${{ matrix.php >= 8.0 }}
7467
uses: ChristophWurst/xmllint-action@v1
7568
with:
7669
xml-file: ./phpunit.xml.dist

.github/workflows/integrations.yml

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,49 @@ on:
1111
# Allow manually triggering the workflow.
1212
workflow_dispatch:
1313

14+
# Cancels all previous workflow runs for the same branch that have not yet completed.
15+
concurrency:
16+
# The concurrency group contains the workflow name and the branch name.
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
1420
jobs:
1521
test:
1622
name: WP ${{ matrix.wordpress }} on PHP ${{ matrix.php }}
17-
runs-on: ubuntu-20.04
23+
runs-on: ubuntu-latest
1824

1925
env:
2026
WP_VERSION: ${{ matrix.wordpress }}
2127

2228
strategy:
23-
# PHP 7.1 uses PHPUnit 7.5.20
24-
# PHP 7.2 uses PHPUnit 8.5.21
25-
# PHP 7.3 uses PHPUnit 9.5.10
26-
# PHP 7.4 uses PHPUnit 9.5.10
27-
# PHP 8.0 uses PHPUnit 9.5.10
28-
# PHP 8.1 uses PHPUnit 9.5.10
29-
# PHP 8.2 uses PHPUnit 9.5.10
30-
# Key:
31-
# - coverage: Whether to run the tests with code coverage.
32-
# - experimental: Whether the build is "allowed to fail".
3329
matrix:
34-
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
35-
wordpress: ['5.5', '5.6', '5.7', '5.8', '5.9']
36-
experimental: [false]
37-
coverage: [none]
30+
php: [ '7.4', '8.2' ]
31+
wordpress: [ '5.7', '6.3' ]
32+
allowed_failure: [false]
33+
coverage: [false]
3834
include:
39-
- php: '7.1'
40-
wordpress: '5.8.3'
41-
experimental: false
42-
coverage: none
35+
# Check upcoming WP.
36+
- php: '8.2'
37+
wordpress: 'trunk'
38+
allowed_failure: true
39+
coverage: false
40+
# Check upcoming PHP.
41+
- php: '8.3'
42+
wordpress: 'latest'
43+
allowed_failure: true
44+
coverage: false
45+
# Code coverage on latest PHP and WP.
46+
- php: '8.2'
47+
wordpress: 'latest'
48+
allowed_failure: false
49+
coverage: true
50+
exclude:
51+
# WordPress 5.7 doesn't support PHP 8.2.
52+
- php: '8.2'
53+
wordpress: '5.7'
4354
fail-fast: false
44-
continue-on-error: ${{ matrix.experimental }}
55+
continue-on-error: ${{ matrix.allowed_failure }}
56+
4557
steps:
4658
- name: Checkout code
4759
uses: actions/checkout@v4
@@ -50,8 +62,7 @@ jobs:
5062
uses: shivammathur/setup-php@v2
5163
with:
5264
php-version: ${{ matrix.php }}
53-
extensions: ${{ matrix.extensions }}
54-
coverage: ${{ matrix.coverage }}
65+
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
5566

5667
- name: Setup problem matchers for PHP
5768
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -60,15 +71,8 @@ jobs:
6071
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
6172

6273
- name: Install Composer dependencies
63-
if: ${{ matrix.php < 8.2 }}
6474
uses: ramsey/composer-install@v2
6575

66-
- name: Install Composer dependencies for PHP >= 8.2
67-
if: ${{ matrix.php >= 8.2 }}
68-
uses: ramsey/composer-install@v2
69-
with:
70-
composer-options: --ignore-platform-reqs
71-
7276
- name: Start MySQL Service
7377
run: sudo systemctl start mysql.service
7478

.phpcs.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<rule ref="PHPCompatibilityWP"/>
3131
<!-- For help in understanding this testVersion:
3232
https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
33-
<config name="testVersion" value="7.1-"/>
33+
<config name="testVersion" value="7.4-"/>
3434

3535
<!-- Rules: WordPress Coding Standards - see
3636
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
@@ -39,7 +39,7 @@
3939
<rule ref="WordPress-Docs"/>
4040
<!-- For help in understanding these custom sniff properties:
4141
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
42-
<config name="minimum_supported_wp_version" value="5.5"/>
42+
<config name="minimum_supported_wp_version" value="5.7"/>
4343

4444
<!-- Rules: WordPress VIP - see
4545
https://github.com/Automattic/VIP-Coding-Standards -->

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Ad Code Manager
22

33
Stable tag: 0.6.0
4-
Requires at least: 5.5
4+
Requires at least: 5.7
55
Tested up to: 5.9
6-
Requires PHP: 7.1
6+
Requires PHP: 7.4
77
License: GPLv2 or later
88
License URI: https://www.gnu.org/licenses/gpl-2.0.html
99
Tags: advertising, ad codes, ads, adsense, dfp, doubleclick for publishers
@@ -25,7 +25,7 @@ Once this configuration is in place, the Ad Code Manager admin interface will al
2525

2626
## Installation
2727

28-
The plugin requires PHP 7.1 or later. It is also test on WordPress 5.5 and later, though it may run on older versions.
28+
The plugin requires PHP 7.4 or later. It is also test on WordPress 5.7 and later, though it may run on older versions.
2929

3030
Since the plugin is in its early stages, there are a couple additional configuration steps:
3131

ad-code-manager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
* License: GPL-2.0-or-later
1919
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
2020
* GitHub Plugin URI: https://github.com/Automattic/ad-code-manager/
21-
* Requires PHP: 7.1
22-
* Requires WP: 5.5.0
21+
* Requires PHP: 7.4
22+
* Requires WP: 5.7
2323
*/
2424

2525
declare(strict_types=1);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=7.1",
14+
"php": ">=7.4",
1515
"composer/installers": "^1.0 || ^2.0"
1616
},
1717
"require-dev": {

0 commit comments

Comments
 (0)