Skip to content

Commit 75bb604

Browse files
authored
Update supported WordPress/PHP versions
- Pin to the latest JS SDK - Upgrade the base WordPress image to wordpress:5.9-php7.3-apache - Update phpunit/phpunit - Switch to MariaDB, version mariadb:10.11 - Adjust the test matrix to use the latest versions PR #199
1 parent 831da0f commit 75bb604

File tree

12 files changed

+1009
-756
lines changed

12 files changed

+1009
-756
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup PHP
1818
uses: shivammathur/setup-php@v2
1919
with:
20-
php-version: 7.2
20+
php-version: 7.3
2121
tools: composer
2222
env:
2323
fail-fast: true

.github/workflows/tests.yml

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,38 @@ jobs:
1212
strategy:
1313
matrix:
1414
# See: https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/
15-
wordpress-version: ['5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9']
16-
php-versions: ['7.2', '7.3', '7.4', '8.0']
17-
exclude:
18-
- php-versions: '8.0'
19-
wordpress-version: '5.2'
20-
- php-versions: '8.0'
21-
wordpress-version: '5.3'
22-
- php-versions: '8.0'
23-
wordpress-version: '5.4'
24-
- php-versions: '8.0'
25-
wordpress-version: '5.5'
15+
wordpress-version: ['6.1', '6.2', '6.3', '6.4', '6.5', '6.6', '6.7']
16+
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2']
17+
include:
18+
# WordPress 6.0:
19+
- wordpress-version: '6.0'
20+
php-versions: '7.3'
21+
- wordpress-version: '6.0'
22+
php-versions: '7.4'
23+
- wordpress-version: '6.0'
24+
php-versions: '8.0'
25+
- wordpress-version: '6.0'
26+
php-versions: '8.1'
27+
# php 8.3:
28+
- php-versions: '8.3'
29+
wordpress-version: '6.7'
30+
- php-versions: '8.3'
31+
wordpress-version: '6.6'
32+
- php-versions: '8.3'
33+
wordpress-version: '6.5'
34+
- php-versions: '8.3'
35+
wordpress-version: '6.4'
2636

2737
name: PHP:${{ matrix.php-versions }} / WP:${{ matrix.wordpress-version }}
2838
services:
29-
mysql:
30-
image: mysql:5.7
39+
mariadb:
40+
image: mariadb:10.11
3141
env:
32-
MYSQL_ALLOW_EMPTY_PASSWORD: false
33-
MYSQL_ROOT_PASSWORD: password
34-
MYSQL_DATABASE: wordpress
42+
MARIADB_ROOT_PASSWORD: password
43+
MARIADB_DATABASE: wordpress
3544
ports:
3645
- 3306
37-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
46+
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3847

3948
steps:
4049
- name: Checkout
@@ -50,35 +59,23 @@ jobs:
5059
fail-fast: true
5160

5261
- name: Setup Wordpress over phpunit
53-
run: bash bin/install-wp-tests.sh wordpress root password 127.0.0.1:${{ job.services.mysql.ports[3306] }} ${{ matrix.wordpress-version }} true
62+
run: bash bin/install-wp-tests.sh wordpress root password 127.0.0.1:${{ job.services.mariadb.ports[3306] }} ${{ matrix.wordpress-version }} true
5463

5564
- name: Get composer cache directory
5665
id: composer-cache
57-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
66+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
5867

5968
- name: Setup problem matchers for PHPUnit
6069
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
6170

6271
- name: Cache composer dependencies
63-
uses: actions/cache@v2
72+
uses: actions/cache@v3
6473
with:
6574
path: ${{ steps.composer-cache.outputs.dir }}
6675
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
6776
restore-keys: ${{ runner.os }}-composer-
6877

69-
- name: Only for WP 5.9 and PHP 8
70-
# See: https://make.wordpress.org/core/2021/09/27/changes-to-the-wordpress-core-php-test-suite/
71-
if: ${{ matrix.php-versions == '8.0' && matrix.wordpress-version == '5.9' }}
72-
run: (composer remove --dev phpunit/phpunit || true ) && composer update --dev yoast/phpunit-polyfills --with-dependencies && composer install --no-progress --prefer-dist --optimize-autoloader
73-
74-
- name: When using PHP 8 and WP <= 5.8
75-
# See: https://core.trac.wordpress.org/ticket/50902
76-
if: ${{ matrix.php-versions == '8.0' && (matrix.wordpress-version == '5.6' || matrix.wordpress-version == '5.7' || matrix.wordpress-version == '5.8' )}}
77-
run: composer install --no-progress --prefer-dist --optimize-autoloader --ignore-platform-reqs
78-
7978
- name: Install Composer dependencies
80-
# Rest of the versions
81-
if: ${{ matrix.php-versions != '8.0' }}
8279
run: composer install --no-progress --prefer-dist --optimize-autoloader
8380

8481
- name: Run the tests
@@ -97,7 +94,7 @@ jobs:
9794
- name: Setup PHP
9895
uses: shivammathur/setup-php@v2
9996
with:
100-
php-version: 7.2
97+
php-version: 7.3
10198
tools: composer
10299
env:
103100
fail-fast: true

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/vendor/
2-
/data
32
.idea
43
.gradle
54
out/

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM wordpress:5.6-php7.2-apache
1+
FROM wordpress:5.9-php7.3-apache
22

33
RUN apt-get update
44
RUN apt-get install -y vim subversion mariadb-client wget

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,7 @@ You can use the `Perfecty_Push_Integration` class to send Push Notifications fro
6969

7070
## Local development 👨🏻‍💻
7171

72-
To see it in action in your local development environment, you need a set of
73-
services which Wordpress relies on. You start off by creating the docker image:
74-
75-
```
76-
docker build -t custom-wordpress:5.6-php7.2-apache .
77-
```
78-
79-
Then start all the services and run the setup:
72+
To see it in action in your local development environment you can run the following commands:
8073

8174
```
8275
make up
@@ -182,4 +175,4 @@ of each project, which in general use the MIT license, except the WordPress plug
182175

183176
[<img alt="Jetbrains" src="https://github.com/perfectyorg/perfecty-push-wp/raw/master/.github/assets/jetbrains-logo.svg" width="120">](https://www.jetbrains.com/?from=PerfectyPush)
184177

185-
Thanks to Jetbrains for supporting this Open Source project with their magnificent tools.
178+
Thanks to Jetbrains for supporting this Open Source project with their magnificent tools.

README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
=== Perfecty Push Notifications ===
22
Contributors: rwngallego, mociofiletto
3-
Donate link: https://paypal.me/tatalata777
3+
Donate link: https://paypal.me/RowinsonG
44
Tags: Push Notifications, Web Push Notifications, Notifications, User engagement
55
Requires at least: 5.0
6-
Tested up to: 6.0
6+
Tested up to: 6.7
77
Stable tag: 1.6.2
88
Requires PHP: 7.2
99
License: GPLv2 or later

admin/partials/perfecty-push-admin-about.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// translators: %1$s is the opening a tag
3030
// translators: %2$s is the closing a tag
3131
esc_html__( 'If you want to support the development of the project, you can %1$sdonate here%2$s.', 'perfecty-push-notifications' ),
32-
'<a href="https://paypal.me/tatalata777" target="_blank">',
32+
'<a href="https://paypal.me/RowinsonG" target="_blank">',
3333
'</a>'
3434
);
3535
?>

bin/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ setup() {
3434
}
3535

3636
up() {
37-
docker compose up -d
37+
docker compose up --build -d
3838
}
3939

4040
down() {

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"require-dev": {
1717
"mockery/mockery": "1.3.*",
18-
"phpunit/phpunit": "^5.7.21 || ^6.5 || ^7.5",
18+
"phpunit/phpunit": "^9.0",
1919
"wp-coding-standards/wpcs": "^2.3",
2020
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
2121
"phpcompatibility/phpcompatibility-wp": "*",

0 commit comments

Comments
 (0)