From ee6a8ede0ab8245015708c496cf85586661d6a00 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 29 May 2023 09:43:12 +0200 Subject: [PATCH] Drop support for PHP 8.1 --- .github/workflows/ci-db-tests.yml | 4 ++-- .github/workflows/ci-mutation-tests.yml | 2 +- .github/workflows/ci-tests.yml | 4 ++-- .github/workflows/ci.yml | 6 +++--- .github/workflows/publish-release.yml | 2 +- .github/workflows/publish-swagger-spec.yml | 2 +- CHANGELOG.md | 17 +++++++++++++++++ README.md | 4 ++-- composer.json | 2 +- data/infra/examples/nginx-vhost.conf | 2 +- .../test-cli/Command/ImportShortUrlsTest.php | 6 +----- .../Rest/test-api/Action/ListShortUrlsTest.php | 1 - 12 files changed, 32 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci-db-tests.yml b/.github/workflows/ci-db-tests.yml index 0c77ded6..f0fc3eaa 100644 --- a/.github/workflows/ci-db-tests.yml +++ b/.github/workflows/ci-db-tests.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: ['8.1', '8.2'] + php-version: ['8.2'] env: LC_ALL: C steps: @@ -36,7 +36,7 @@ jobs: run: composer test:db:${{ inputs.platform }} - name: Upload code coverage uses: actions/upload-artifact@v3 - if: ${{ matrix.php-version == '8.1' && inputs.platform == 'sqlite:ci' }} + if: ${{ matrix.php-version == '8.2' && inputs.platform == 'sqlite:ci' }} with: name: coverage-db path: | diff --git a/.github/workflows/ci-mutation-tests.yml b/.github/workflows/ci-mutation-tests.yml index 20e5aefa..a0facf09 100644 --- a/.github/workflows/ci-mutation-tests.yml +++ b/.github/workflows/ci-mutation-tests.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: ['8.1', '8.2'] + php-version: ['8.2'] steps: - uses: actions/checkout@v3 - uses: './.github/actions/ci-setup' diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 043a3824..e407da70 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: ['8.1', '8.2'] + php-version: ['8.2'] steps: - uses: actions/checkout@v3 - name: Start postgres database server @@ -29,7 +29,7 @@ jobs: extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }} - run: composer test:${{ inputs.test-group }}:ci - uses: actions/upload-artifact@v3 - if: ${{ matrix.php-version == '8.1' }} + if: ${{ matrix.php-version == '8.2' }} with: name: coverage-${{ inputs.test-group }} path: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdc5a025..4f19904d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: ['8.1'] + php-version: ['8.2'] command: ['cs', 'stan', 'swagger:validate'] steps: - uses: actions/checkout@v3 @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: ['8.1', '8.2'] + php-version: ['8.2'] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # rr get-binary picks this env automatically steps: @@ -135,7 +135,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: ['8.1'] + php-version: ['8.2'] steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index bda463a9..66c24528 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: ['8.1', '8.2'] + php-version: ['8.2'] swoole: ['yes', 'no'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/publish-swagger-spec.yml b/.github/workflows/publish-swagger-spec.yml index 06b33566..225a9836 100644 --- a/.github/workflows/publish-swagger-spec.yml +++ b/.github/workflows/publish-swagger-spec.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - php-version: ['8.1'] + php-version: ['8.2'] steps: - uses: actions/checkout@v3 - name: Determine version diff --git a/CHANGELOG.md b/CHANGELOG.md index bd4c68b6..6c967cdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org). +## [Unreleased] +### Added +* *Nothing* + +### Changed +* *Nothing* + +### Deprecated +* *Nothing* + +### Removed +* [#1790](https://github.com/shlinkio/shlink/issues/1790) Drop support for PHP 8.1. + +### Fixed +* *Nothing* + + ## [3.6.0] - 2023-05-24 ### Added * [#1148](https://github.com/shlinkio/shlink/issues/1148) Add support to delete short URL visits. diff --git a/README.md b/README.md index e86c5156..c01e343c 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,11 @@ You can learn how to use the official docker image by reading [the docs](https:/ The idea is that you can just generate a container using the image and provide the custom config via env vars. -## Self hosted +## Self-hosted First, make sure the host where you are going to run shlink fulfills these requirements: -* PHP 8.1 or 8.2 +* PHP 8.2 * The next PHP extensions: json, curl, pdo, intl, gd and gmp/bcmath. * apcu extension is recommended if you don't plan to use openswoole. * xml extension is required if you want to generate QR codes in svg format. diff --git a/composer.json b/composer.json index a3494086..63196aa7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "ext-curl": "*", "ext-gd": "*", "ext-json": "*", diff --git a/data/infra/examples/nginx-vhost.conf b/data/infra/examples/nginx-vhost.conf index 6cd4dd4e..0cd3ff4b 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.1-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; fastcgi_index index.php; include fastcgi.conf; } diff --git a/module/CLI/test-cli/Command/ImportShortUrlsTest.php b/module/CLI/test-cli/Command/ImportShortUrlsTest.php index 3a710af0..1ed15d7c 100644 --- a/module/CLI/test-cli/Command/ImportShortUrlsTest.php +++ b/module/CLI/test-cli/Command/ImportShortUrlsTest.php @@ -19,11 +19,7 @@ use function unlink; class ImportShortUrlsTest extends CliTestCase { - /** - * @var false|string|null - * @todo Use native type once PHP 8.1 support is dropped - */ - private mixed $tempCsvFile = null; + private false|string|null $tempCsvFile = null; protected function setUp(): void { diff --git a/module/Rest/test-api/Action/ListShortUrlsTest.php b/module/Rest/test-api/Action/ListShortUrlsTest.php index 6c599a4f..bb6296f7 100644 --- a/module/Rest/test-api/Action/ListShortUrlsTest.php +++ b/module/Rest/test-api/Action/ListShortUrlsTest.php @@ -169,7 +169,6 @@ class ListShortUrlsTest extends ApiTestCase public static function provideFilteredLists(): iterable { - // FIXME Cannot use enums in constants in PHP 8.1. Change this once support for PHP 8.1 is dropped $withDeviceLongUrls = static fn (array $shortUrl, ?array $longUrls = null) => [ ...$shortUrl, 'deviceLongUrls' => $longUrls ?? [