diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 816dbb8..85e142c 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -114,7 +114,7 @@ jobs: needs: build-php-images strategy: matrix: - phpunit: [ '7-php-7.0', '6-php-7.0', '5-php-7.0', '7-php-7.1', '6-php-7.1', '8-php-7.2', '7-php-7.2', '6-php-7.2', '9-php-7.3', '8-php-7.3', '7-php-7.3', '6-php-7.3', '9-php-7.4', '8-php-7.4', '7-php-7.4', '9-php-8.0', '8-php-8.0', '9-php-8.1', '8-php-8.1', '9-php-8.2', '8-php-8.2', '9-php-8.3' ] + phpunit: [ '7-php-7.0', '6-php-7.0', '5-php-7.0', '7-php-7.1', '6-php-7.1', '8-php-7.2', '7-php-7.2', '6-php-7.2', '9-php-7.3', '8-php-7.3', '7-php-7.3', '6-php-7.3', '9-php-7.4', '8-php-7.4', '7-php-7.4', '9-php-8.0', '8-php-8.0', '10-php-8.1', '9-php-8.1', '8-php-8.1', '10-php-8.2', '9-php-8.2', '8-php-8.2', '10-php-8.3', '9-php-8.3' ] env: PHPUNIT_VERSION: ${{ matrix.phpunit }} diff --git a/.github/workflows/github-container-registry.yml b/.github/workflows/github-container-registry.yml index d63f414..885d210 100644 --- a/.github/workflows/github-container-registry.yml +++ b/.github/workflows/github-container-registry.yml @@ -123,7 +123,7 @@ jobs: needs: build-php-images strategy: matrix: - phpunit: [ '7-php-7.0', '6-php-7.0', '5-php-7.0', '7-php-7.1', '6-php-7.1', '8-php-7.2', '7-php-7.2', '6-php-7.2', '9-php-7.3', '8-php-7.3', '7-php-7.3', '6-php-7.3', '9-php-7.4', '8-php-7.4', '7-php-7.4', '9-php-8.0', '8-php-8.0', '9-php-8.1', '8-php-8.1', '9-php-8.2', '8-php-8.2', '9-php-8.3' ] + phpunit: [ '7-php-7.0', '6-php-7.0', '5-php-7.0', '7-php-7.1', '6-php-7.1', '8-php-7.2', '7-php-7.2', '6-php-7.2', '9-php-7.3', '8-php-7.3', '7-php-7.3', '6-php-7.3', '9-php-7.4', '8-php-7.4', '7-php-7.4', '9-php-8.0', '8-php-8.0', '10-php-8.1', '9-php-8.1', '8-php-8.1', '10-php-8.2', '9-php-8.2', '8-php-8.2', '10-php-8.3', '9-php-8.3' ] env: PHPUNIT_VERSION: ${{ matrix.phpunit }} diff --git a/images/phpunit/10-php-8.1/Dockerfile b/images/phpunit/10-php-8.1/Dockerfile new file mode 100644 index 0000000..e3ba6e0 --- /dev/null +++ b/images/phpunit/10-php-8.1/Dockerfile @@ -0,0 +1,22 @@ +ARG PACKAGE_REGISTRY +ARG PR_TAG +FROM $PACKAGE_REGISTRY/php:8.1-fpm$PR_TAG + +########################################################################## +# +# WARNING: This file was generated by update.php. +# +# You can find the relevant template in the `/templates` folder. +# + +RUN curl -sL https://phar.phpunit.de/phpunit-10.phar > /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit + +WORKDIR /var/www + +COPY entrypoint.sh /entrypoint.sh + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT [ "/entrypoint.sh" ] + +CMD /usr/local/bin/phpunit diff --git a/images/phpunit/10-php-8.1/entrypoint.sh b/images/phpunit/10-php-8.1/entrypoint.sh new file mode 100644 index 0000000..ef08bb8 --- /dev/null +++ b/images/phpunit/10-php-8.1/entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +source /common.sh + +chown -R wp_php:wp_php /var/www/${LOCAL_DIR-src}/wp-content/uploads + +# Execute CMD +sudo -E -u wp_php "$@" diff --git a/images/phpunit/10-php-8.2/Dockerfile b/images/phpunit/10-php-8.2/Dockerfile new file mode 100644 index 0000000..7283537 --- /dev/null +++ b/images/phpunit/10-php-8.2/Dockerfile @@ -0,0 +1,22 @@ +ARG PACKAGE_REGISTRY +ARG PR_TAG +FROM $PACKAGE_REGISTRY/php:8.2-fpm$PR_TAG + +########################################################################## +# +# WARNING: This file was generated by update.php. +# +# You can find the relevant template in the `/templates` folder. +# + +RUN curl -sL https://phar.phpunit.de/phpunit-10.phar > /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit + +WORKDIR /var/www + +COPY entrypoint.sh /entrypoint.sh + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT [ "/entrypoint.sh" ] + +CMD /usr/local/bin/phpunit diff --git a/images/phpunit/10-php-8.2/entrypoint.sh b/images/phpunit/10-php-8.2/entrypoint.sh new file mode 100644 index 0000000..ef08bb8 --- /dev/null +++ b/images/phpunit/10-php-8.2/entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +source /common.sh + +chown -R wp_php:wp_php /var/www/${LOCAL_DIR-src}/wp-content/uploads + +# Execute CMD +sudo -E -u wp_php "$@" diff --git a/images/phpunit/10-php-8.3/Dockerfile b/images/phpunit/10-php-8.3/Dockerfile new file mode 100644 index 0000000..20e1e70 --- /dev/null +++ b/images/phpunit/10-php-8.3/Dockerfile @@ -0,0 +1,22 @@ +ARG PACKAGE_REGISTRY +ARG PR_TAG +FROM $PACKAGE_REGISTRY/php:8.3-fpm$PR_TAG + +########################################################################## +# +# WARNING: This file was generated by update.php. +# +# You can find the relevant template in the `/templates` folder. +# + +RUN curl -sL https://phar.phpunit.de/phpunit-10.phar > /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit + +WORKDIR /var/www + +COPY entrypoint.sh /entrypoint.sh + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT [ "/entrypoint.sh" ] + +CMD /usr/local/bin/phpunit diff --git a/images/phpunit/10-php-8.3/entrypoint.sh b/images/phpunit/10-php-8.3/entrypoint.sh new file mode 100644 index 0000000..ef08bb8 --- /dev/null +++ b/images/phpunit/10-php-8.3/entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +source /common.sh + +chown -R wp_php:wp_php /var/www/${LOCAL_DIR-src}/wp-content/uploads + +# Execute CMD +sudo -E -u wp_php "$@" diff --git a/update.php b/update.php index fd52d91..fd9af67 100644 --- a/update.php +++ b/update.php @@ -274,6 +274,11 @@ * @param array $phpunit_version A list of PHP versions for each PHPUnit version. */ $phpunit_versions = array( + '10' => array( + '8.3', + '8.2', + '8.1', + ), '9' => array( '8.3', '8.2',