Skip to content

Commit fb8e61a

Browse files
Updates package versions to be composer 2 compatible (#294)
* updates package versions to be composer 2 compatible * adds ignore for intentionally capitalized object * fix: disable opcache for php56 * fix: phpunit 6 not compatible with older php versions * remove php 56 test CI * remove references to old tests * fix: update phpunit to 6 * dependency shuffle :! * add 56 tests back in CI * remove 56 again
1 parent 66a9ace commit fb8e61a

File tree

6 files changed

+4144
-327
lines changed

6 files changed

+4144
-327
lines changed

.circleci/config.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,6 @@ jobs:
101101
- run:
102102
name: Run PHP Code Sniffer Check
103103
command: composer phpcs
104-
job_test_php56_min:
105-
<<: *job_phpunit_base
106-
environment:
107-
CONTAINER_WP_VERSION: "5.1"
108-
CONTAINER_PHP_VERSION: "5.6"
109-
job_test_php56:
110-
<<: *job_phpunit_base
111-
environment:
112-
CONTAINER_WP_VERSION: "latest"
113-
CONTAINER_PHP_VERSION: "5.6"
114104
job_test_php70:
115105
<<: *job_phpunit_base
116106
environment:
@@ -166,14 +156,6 @@ workflows:
166156
<<: *workflow_job
167157
requires:
168158
- job_test_javascript
169-
- job_test_php56_min:
170-
<<: *workflow_job
171-
requires:
172-
- job_php_code_standards
173-
- job_test_php56:
174-
<<: *workflow_job
175-
requires:
176-
- job_php_code_standards
177159
- job_test_php70:
178160
<<: *workflow_job
179161
requires:
@@ -196,8 +178,6 @@ workflows:
196178
- job_php_code_standards
197179
- deploy_job:
198180
requires:
199-
- job_test_php56_min
200-
- job_test_php56
201181
- job_test_php70
202182
- job_test_php71
203183
- job_test_php72

Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# Start with the latest WordPress image.
2-
FROM wordpress:4.9.1-php7.0-apache
2+
FROM wordpress:5.8.0-php7.4-apache
33

44
# Set up nodejs PPA
5-
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash
5+
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
66

77
# Install server dependencies.
8-
RUN apt-get update && apt-get install -qq -y nodejs build-essential pkg-config libcairo2-dev libjpeg-dev libgif-dev git subversion mysql-client zip unzip vim libyaml-dev --fix-missing --no-install-recommends
8+
RUN apt-get update && apt-get install -qq -y nodejs build-essential pkg-config libcairo2-dev libjpeg-dev libgif-dev git subversion mariadb-client zip unzip vim libyaml-dev --fix-missing --no-install-recommends
99

1010
# Setup phpunit dependencies (needed for coverage).
1111
RUN pecl install xdebug && \
1212
docker-php-ext-enable xdebug
1313

1414
COPY tests/install-wp-tests.sh /
15-
RUN /install-wp-tests.sh wordpress root password mysql 4.9.1 true
15+
RUN /install-wp-tests.sh wordpress root password mysql 5.8.0 true
1616

1717
# Download wp-cli
1818
RUN curl -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod 755 /usr/local/bin/wp
1919

2020
# Speed up phpcs https://stackoverflow.com/questions/37450185/php-code-sniffer-via-grunt-is-incredibly-slow
21-
RUN echo "default_socket_timeout = 5\nlog_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/php.ini
21+
RUN echo "default_socket_timeout = 5\nlog_errors = On\nerror_log = /dev/stderr\nopcache.enable= 0" > /usr/local/etc/php/php.ini
2222

2323
# Disable PHP opcache (not great while developing)
2424
RUN rm -rf /usr/local/etc/php/conf.d/opcache-recommended.ini
@@ -32,8 +32,8 @@ RUN composer global require "phpunit/phpunit:^6"
3232
RUN npm install grunt-cli -g
3333

3434
ENV PATH="/root/.composer/vendor/bin:${PATH}"
35-
ENV WP_VERSION="4.9.1"
35+
ENV WP_VERSION="5.8.0"
3636

3737
# DONT run as ROOT
38-
RUN useradd -ms /bin/bash phpcompat
39-
USER phpcompat
38+
# RUN useradd -ms /bin/bash phpcompat
39+
# USER phpcompat

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"type": "wordpress-plugin",
44
"description": "Test PHP Compatibility.",
55
"authors": [{
6-
"name": "Jason Stallings",
7-
"email": "[email protected]"
6+
"name": "WP Engine",
7+
"email": "[email protected]"
88
}],
99
"require": {
10-
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
11-
"phpcompatibility/phpcompatibility-wp": "^2",
12-
"squizlabs/php_codesniffer": "2.9.2"
10+
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
11+
"phpcompatibility/phpcompatibility-wp": "^2.1.2",
12+
"squizlabs/php_codesniffer": "^2.6"
1313
},
1414
"require-dev": {
1515
"wp-coding-standards/wpcs": "^1",
16-
"phpunit/phpunit": "^5"
16+
"phpunit/phpunit": "^6"
1717
},
1818
"scripts": {
1919
"phpcs": "phpcs --standard=src/ruleset-wordpress.xml wpengine-phpcompat.php load-files.php src/*.php",

0 commit comments

Comments
 (0)