Skip to content

Commit ee33966

Browse files
author
John Spellman
committed
[CMSP-72] PHP 8.2 compatibility (#388)
1 parent 010bedc commit ee33966

File tree

5 files changed

+1178
-768
lines changed

5 files changed

+1178
-768
lines changed

.circleci/config.yml

Lines changed: 93 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ workflows:
55
jobs:
66
- lint
77
- test-behat
8-
- test-phpunit-redis-disabled
9-
- test-phpunit-redis-enabled
8+
- test-phpunit-redis-disabled-74
9+
- test-phpunit-redis-enabled-74
10+
- test-phpunit-redis-disabled-82
11+
- test-phpunit-redis-enabled-82
1012
nightly:
1113
triggers:
1214
- schedule:
@@ -21,7 +23,7 @@ jobs:
2123
lint:
2224
working_directory: ~/pantheon-systems/wp-redis
2325
docker:
24-
- image: quay.io/pantheon-public/build-tools-ci:8.x-php7.4
26+
- image: quay.io/pantheon-public/build-tools-ci:8.x-php8.2
2527
steps:
2628
- checkout
2729
- restore_cache:
@@ -40,7 +42,7 @@ jobs:
4042
working_directory: ~/pantheon-systems/wp-redis
4143
parallelism: 1
4244
docker:
43-
- image: quay.io/pantheon-public/build-tools-ci:8.x-php7.4
45+
- image: quay.io/pantheon-public/build-tools-ci:8.x-php8.2
4446
steps:
4547
- checkout
4648
- restore_cache:
@@ -81,7 +83,7 @@ jobs:
8183
- run:
8284
command: ./bin/behat-cleanup.sh
8385
when: always
84-
test-phpunit-redis-disabled:
86+
test-phpunit-redis-disabled-74:
8587
working_directory: ~/pantheon-systems/wp-redis
8688
docker:
8789
- image: circleci/php:7.4-node-browsers
@@ -93,10 +95,10 @@ jobs:
9395
- checkout
9496
- restore_cache:
9597
keys:
96-
- test-phpunit-dependencies-{{ checksum "composer.json" }}
98+
- test-phpunit-74-dependencies-{{ checksum "composer.json" }}
9799
- run: composer install -n --prefer-dist
98100
- save_cache:
99-
key: test-phpunit-dependencies-{{ checksum "composer.json" }}
101+
key: test-phpunit-74-dependencies-{{ checksum "composer.json" }}
100102
paths:
101103
- vendor
102104
- run:
@@ -120,7 +122,7 @@ jobs:
120122
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
121123
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
122124
composer phpunit
123-
test-phpunit-redis-enabled:
125+
test-phpunit-redis-enabled-74:
124126
working_directory: ~/pantheon-systems/wp-redis
125127
docker:
126128
- image: circleci/php:7.4-node-browsers
@@ -133,10 +135,10 @@ jobs:
133135
- checkout
134136
- restore_cache:
135137
keys:
136-
- test-phpunit-dependencies-{{ checksum "composer.json" }}
138+
- test-phpunit-74-dependencies-{{ checksum "composer.json" }}
137139
- run: composer install -n --prefer-dist
138140
- save_cache:
139-
key: test-phpunit-dependencies-{{ checksum "composer.json" }}
141+
key: test-phpunit-74-dependencies-{{ checksum "composer.json" }}
140142
paths:
141143
- vendor
142144
- run:
@@ -162,3 +164,84 @@ jobs:
162164
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
163165
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
164166
composer phpunit
167+
test-phpunit-redis-disabled-82:
168+
working_directory: ~/pantheon-systems/wp-redis
169+
docker:
170+
- image: cimg/php:8.2.0
171+
- image: circleci/mariadb:10.3
172+
environment:
173+
- WP_TESTS_DIR: "/tmp/wordpress-tests-lib"
174+
- WP_CORE_DIR: "/tmp/wordpress/"
175+
steps:
176+
- checkout
177+
- restore_cache:
178+
keys:
179+
- test-phpunit-82-dependencies-{{ checksum "composer.json" }}
180+
- run: composer install -n --prefer-dist
181+
- save_cache:
182+
key: test-phpunit-82-dependencies-{{ checksum "composer.json" }}
183+
paths:
184+
- vendor
185+
- run:
186+
name: "Install Extras"
187+
command: |
188+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
189+
sudo apt-get update
190+
sudo apt-get install subversion
191+
sudo apt-get install -y libmagickwand-dev --no-install-recommends
192+
yes '' | sudo pecl install imagick || true
193+
sudo docker-php-ext-enable imagick
194+
sudo docker-php-ext-install mysqli
195+
sudo apt-get install mariadb-client-10.6
196+
- run:
197+
name: "Run Tests"
198+
command: |
199+
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
200+
composer phpunit
201+
WP_MULTISITE=1 composer phpunit
202+
WP_REDIS_USE_CACHE_GROUPS=1 composer phpunit
203+
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
204+
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
205+
composer phpunit
206+
test-phpunit-redis-enabled-82:
207+
working_directory: ~/pantheon-systems/wp-redis
208+
docker:
209+
- image: cimg/php:8.2.0
210+
- image: circleci/mariadb:10.3
211+
- image: circleci/redis:latest
212+
environment:
213+
- WP_TESTS_DIR: "/tmp/wordpress-tests-lib"
214+
- WP_CORE_DIR: "/tmp/wordpress/"
215+
steps:
216+
- checkout
217+
- restore_cache:
218+
keys:
219+
- test-phpunit-82-dependencies-{{ checksum "composer.json" }}
220+
- run: composer install -n --prefer-dist
221+
- save_cache:
222+
key: test-phpunit-82-dependencies-{{ checksum "composer.json" }}
223+
paths:
224+
- vendor
225+
- run:
226+
name: "Install Extras"
227+
command: |
228+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
229+
sudo apt-get update
230+
sudo apt-get install subversion
231+
sudo apt-get install -y libmagickwand-dev --no-install-recommends
232+
yes '' | sudo pecl install imagick || true
233+
sudo docker-php-ext-enable imagick
234+
sudo docker-php-ext-install mysqli
235+
sudo apt-get install mariadb-client-10.6
236+
yes '' | sudo pecl install redis || true
237+
sudo docker-php-ext-enable redis
238+
- run:
239+
name: "Run Tests"
240+
command: |
241+
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
242+
composer phpunit
243+
WP_MULTISITE=1 composer phpunit
244+
WP_REDIS_USE_CACHE_GROUPS=1 composer phpunit
245+
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
246+
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true
247+
composer phpunit

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"behat/mink-extension": "^2.2",
1414
"behat/mink-goutte-driver": "^1.2",
1515
"pantheon-systems/pantheon-wordpress-upstream-tests": "dev-master",
16-
"wp-coding-standards/wpcs": "^2",
16+
"wp-coding-standards/wpcs": "dev-develop as 2.3.1",
1717
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
18-
"phpunit/phpunit": "^7",
18+
"phpunit/phpunit": "^9",
1919
"phpcompatibility/php-compatibility": "^9.3",
2020
"yoast/phpunit-polyfills": "^1.0"
2121
},

0 commit comments

Comments
 (0)