From f2a7b687a9928d39cc31b660bb29240505c63a1c Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 11 Feb 2024 11:22:48 +0100 Subject: [PATCH 1/2] Update docker images to PHP 8.3 --- .github/actions/ci-setup/action.yml | 2 +- .github/workflows/ci-db-tests.yml | 3 +-- .github/workflows/ci-mutation-tests.yml | 3 +-- .github/workflows/ci-tests.yml | 3 +-- .github/workflows/ci.yml | 5 ++--- .github/workflows/publish-release.yml | 2 +- .github/workflows/publish-swagger-spec.yml | 2 +- Dockerfile | 6 +++--- build.sh | 3 +-- data/infra/examples/nginx-vhost.conf | 2 +- data/infra/php.Dockerfile | 6 +++--- data/infra/roadrunner.Dockerfile | 6 +++--- data/infra/swoole.Dockerfile | 8 ++++---- 13 files changed, 23 insertions(+), 28 deletions(-) diff --git a/.github/actions/ci-setup/action.yml b/.github/actions/ci-setup/action.yml index 054575eb6..19df378aa 100644 --- a/.github/actions/ci-setup/action.yml +++ b/.github/actions/ci-setup/action.yml @@ -43,5 +43,5 @@ runs: ini-values: pcov.directory=module - name: Install dependencies if: ${{ inputs.install-deps == 'yes' }} - run: composer install --no-interaction --prefer-dist ${{ inputs.php-version == '8.3' && '--ignore-platform-reqs' || '' }} + run: composer install --no-interaction --prefer-dist shell: bash diff --git a/.github/workflows/ci-db-tests.yml b/.github/workflows/ci-db-tests.yml index cc653315e..f2aaefb93 100644 --- a/.github/workflows/ci-db-tests.yml +++ b/.github/workflows/ci-db-tests.yml @@ -14,7 +14,6 @@ jobs: strategy: matrix: php-version: ['8.2', '8.3'] - continue-on-error: ${{ matrix.php-version == '8.3' }} env: LC_ALL: C steps: @@ -28,7 +27,7 @@ jobs: - uses: './.github/actions/ci-setup' with: php-version: ${{ matrix.php-version }} - php-extensions: openswoole-22.1.0, pdo_sqlsrv-5.11.1 + php-extensions: openswoole-22.1.2, pdo_sqlsrv-5.12.0 extensions-cache-key: db-tests-extensions-${{ matrix.php-version }}-${{ inputs.platform }} - name: Create test database if: ${{ inputs.platform == 'ms' }} diff --git a/.github/workflows/ci-mutation-tests.yml b/.github/workflows/ci-mutation-tests.yml index d0d18c15a..64da4adc6 100644 --- a/.github/workflows/ci-mutation-tests.yml +++ b/.github/workflows/ci-mutation-tests.yml @@ -14,13 +14,12 @@ jobs: strategy: matrix: php-version: ['8.2', '8.3'] - continue-on-error: ${{ matrix.php-version == '8.3' }} steps: - uses: actions/checkout@v4 - uses: './.github/actions/ci-setup' with: php-version: ${{ matrix.php-version }} - php-extensions: openswoole-22.1.0 + php-extensions: openswoole-22.1.2 extensions-cache-key: mutation-tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }} - uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 77c055bff..48cc56efe 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -14,7 +14,6 @@ jobs: strategy: matrix: php-version: ['8.2', '8.3'] - continue-on-error: ${{ matrix.php-version == '8.3' }} steps: - uses: actions/checkout@v4 - name: Start postgres database server @@ -26,7 +25,7 @@ jobs: - uses: './.github/actions/ci-setup' with: php-version: ${{ matrix.php-version }} - php-extensions: openswoole-22.1.0 + php-extensions: openswoole-22.1.2 extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }} - run: composer test:${{ inputs.test-group }}:ci - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcbe0a485..c6b08e295 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - uses: './.github/actions/ci-setup' with: php-version: ${{ matrix.php-version }} - php-extensions: openswoole-22.1.0 + php-extensions: openswoole-22.1.2 extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ matrix.command }} - run: composer ${{ matrix.command }} @@ -60,7 +60,6 @@ jobs: strategy: matrix: php-version: ['8.2', '8.3'] - continue-on-error: ${{ matrix.php-version == '8.3' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # rr get-binary picks this env automatically steps: @@ -70,7 +69,7 @@ jobs: with: php-version: ${{ matrix.php-version }} tools: composer - - run: composer install --no-interaction --prefer-dist --ignore-platform-req=ext-openswoole ${{ matrix.php-version == '8.3' && '--ignore-platform-reqs' || '' }} + - run: composer install --no-interaction --prefer-dist --ignore-platform-req=ext-openswoole - run: ./vendor/bin/rr get --no-interaction --no-config --location bin/ && chmod +x bin/rr - run: composer test:api:rr diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 3fe1a1a4d..76d04f947 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -17,7 +17,7 @@ jobs: - uses: './.github/actions/ci-setup' with: php-version: ${{ matrix.php-version }} - php-extensions: openswoole-22.1.0 + php-extensions: openswoole-22.1.2 extensions-cache-key: publish-swagger-spec-extensions-${{ matrix.php-version }} install-deps: 'no' - if: ${{ matrix.swoole == 'yes' }} diff --git a/.github/workflows/publish-swagger-spec.yml b/.github/workflows/publish-swagger-spec.yml index 2ecf8d493..aa7e5e93e 100644 --- a/.github/workflows/publish-swagger-spec.yml +++ b/.github/workflows/publish-swagger-spec.yml @@ -20,7 +20,7 @@ jobs: - uses: './.github/actions/ci-setup' with: php-version: ${{ matrix.php-version }} - php-extensions: openswoole-22.1.0 + php-extensions: openswoole-22.1.2 extensions-cache-key: publish-swagger-spec-extensions-${{ matrix.php-version }} - run: composer swagger:inline - run: mkdir ${{ steps.determine_version.outputs.version }} diff --git a/Dockerfile b/Dockerfile index 0916b10be..2616323af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-alpine3.17 as base +FROM php:8.3-alpine3.19 as base ARG SHLINK_VERSION=latest ENV SHLINK_VERSION ${SHLINK_VERSION} @@ -7,8 +7,8 @@ ENV SHLINK_RUNTIME ${SHLINK_RUNTIME} ARG SHLINK_USER_ID='root' ENV SHLINK_USER_ID ${SHLINK_USER_ID} -ENV OPENSWOOLE_VERSION 22.1.0 -ENV PDO_SQLSRV_VERSION 5.11.1 +ENV OPENSWOOLE_VERSION 22.1.2 +ENV PDO_SQLSRV_VERSION 5.12.0 ENV MS_ODBC_DOWNLOAD 'b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486' ENV MS_ODBC_SQL_VERSION 18_18.1.1.1 ENV LC_ALL 'C' diff --git a/build.sh b/build.sh index db6071720..f91ab408d 100755 --- a/build.sh +++ b/build.sh @@ -31,8 +31,7 @@ cd "${builtContent}" # Install dependencies echo "Installing dependencies with $composerBin..." -# Deprecated. Do not ignore PHP platform req for Shlink v4.0.0 -composerFlags="--optimize-autoloader --no-progress --no-interaction --ignore-platform-req=php+" +composerFlags="--optimize-autoloader --no-progress --no-interaction" ${composerBin} self-update ${composerBin} install --no-dev --prefer-dist $composerFlags diff --git a/data/infra/examples/nginx-vhost.conf b/data/infra/examples/nginx-vhost.conf index 0cd3ff4b2..b7a5d4fac 100644 --- a/data/infra/examples/nginx-vhost.conf +++ b/data/infra/examples/nginx-vhost.conf @@ -11,7 +11,7 @@ server { location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; fastcgi_index index.php; include fastcgi.conf; } diff --git a/data/infra/php.Dockerfile b/data/infra/php.Dockerfile index 14c99f95c..20732e3fe 100644 --- a/data/infra/php.Dockerfile +++ b/data/infra/php.Dockerfile @@ -1,8 +1,8 @@ -FROM php:8.2-fpm-alpine3.17 +FROM php:8.3-fpm-alpine3.19 MAINTAINER Alejandro Celaya -ENV APCU_VERSION 5.1.21 -ENV PDO_SQLSRV_VERSION 5.11.1 +ENV APCU_VERSION 5.1.23 +ENV PDO_SQLSRV_VERSION 5.12.0 ENV MS_ODBC_DOWNLOAD 'b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486' ENV MS_ODBC_SQL_VERSION 18_18.1.1.1 diff --git a/data/infra/roadrunner.Dockerfile b/data/infra/roadrunner.Dockerfile index 0e91d4914..33768eda5 100644 --- a/data/infra/roadrunner.Dockerfile +++ b/data/infra/roadrunner.Dockerfile @@ -1,8 +1,8 @@ -FROM php:8.2-alpine3.17 +FROM php:8.3-alpine3.19 MAINTAINER Alejandro Celaya -ENV APCU_VERSION 5.1.21 -ENV PDO_SQLSRV_VERSION 5.11.1 +ENV APCU_VERSION 5.1.23 +ENV PDO_SQLSRV_VERSION 5.12.0 ENV MS_ODBC_DOWNLOAD 'b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486' ENV MS_ODBC_SQL_VERSION 18_18.1.1.1 diff --git a/data/infra/swoole.Dockerfile b/data/infra/swoole.Dockerfile index 72536c75f..4bc603859 100644 --- a/data/infra/swoole.Dockerfile +++ b/data/infra/swoole.Dockerfile @@ -1,10 +1,10 @@ -FROM php:8.2-alpine3.17 +FROM php:8.3-alpine3.19 MAINTAINER Alejandro Celaya -ENV APCU_VERSION 5.1.21 +ENV APCU_VERSION 5.1.23 ENV INOTIFY_VERSION 3.0.0 -ENV OPENSWOOLE_VERSION 22.1.0 -ENV PDO_SQLSRV_VERSION 5.11.1 +ENV OPENSWOOLE_VERSION 22.1.2 +ENV PDO_SQLSRV_VERSION 5.12.0 ENV MS_ODBC_DOWNLOAD 'b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486' ENV MS_ODBC_SQL_VERSION 18_18.1.1.1 From 7a6bfed44589cec7435a27cc65bf113574cdaf30 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 11 Feb 2024 11:23:34 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5798e4c3..7d09a1426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this ### Changed * [#1935](https://github.com/shlinkio/shlink/issues/1935) Replace dependency on abandoned `php-middleware/request-id` with userland simple middleware. * [#1988](https://github.com/shlinkio/shlink/issues/1988) Remove dependency on `league\uri` package. +* [#1909](https://github.com/shlinkio/shlink/issues/1909) Update docker image to PHP 8.3. ### Deprecated * *Nothing*