Merge pull request #1793 from acelaya-forks/feature/drop-php-8.1

Drop support for PHP 8.1
This commit is contained in:
Alejandro Celaya 2023-05-29 21:53:30 +02:00 committed by GitHub
commit 112b54ec7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 32 additions and 20 deletions

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
php-version: ['8.1', '8.2'] php-version: ['8.2']
env: env:
LC_ALL: C LC_ALL: C
steps: steps:
@ -36,7 +36,7 @@ jobs:
run: composer test:db:${{ inputs.platform }} run: composer test:db:${{ inputs.platform }}
- name: Upload code coverage - name: Upload code coverage
uses: actions/upload-artifact@v3 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: with:
name: coverage-db name: coverage-db
path: | path: |

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
php-version: ['8.1', '8.2'] php-version: ['8.2']
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: './.github/actions/ci-setup' - uses: './.github/actions/ci-setup'

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
php-version: ['8.1', '8.2'] php-version: ['8.2']
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Start postgres database server - name: Start postgres database server
@ -29,7 +29,7 @@ jobs:
extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }} extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }}
- run: composer test:${{ inputs.test-group }}:ci - run: composer test:${{ inputs.test-group }}:ci
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if: ${{ matrix.php-version == '8.1' }} if: ${{ matrix.php-version == '8.2' }}
with: with:
name: coverage-${{ inputs.test-group }} name: coverage-${{ inputs.test-group }}
path: | path: |

View file

@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
php-version: ['8.1'] php-version: ['8.2']
command: ['cs', 'stan', 'swagger:validate'] command: ['cs', 'stan', 'swagger:validate']
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -59,7 +59,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
php-version: ['8.1', '8.2'] php-version: ['8.2']
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # rr get-binary picks this env automatically GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # rr get-binary picks this env automatically
steps: steps:
@ -135,7 +135,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
php-version: ['8.1'] php-version: ['8.2']
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3

View file

@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
php-version: ['8.1', '8.2'] php-version: ['8.2']
swoole: ['yes', 'no'] swoole: ['yes', 'no']
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View file

@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
php-version: ['8.1'] php-version: ['8.2']
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Determine version - name: Determine version

View file

@ -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). 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 ## [3.6.0] - 2023-05-24
### Added ### Added
* [#1148](https://github.com/shlinkio/shlink/issues/1148) Add support to delete short URL visits. * [#1148](https://github.com/shlinkio/shlink/issues/1148) Add support to delete short URL visits.

View file

@ -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. 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: 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. * The next PHP extensions: json, curl, pdo, intl, gd and gmp/bcmath.
* apcu extension is recommended if you don't plan to use openswoole. * 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. * xml extension is required if you want to generate QR codes in svg format.

View file

@ -12,7 +12,7 @@
} }
], ],
"require": { "require": {
"php": "^8.1", "php": "^8.2",
"ext-curl": "*", "ext-curl": "*",
"ext-gd": "*", "ext-gd": "*",
"ext-json": "*", "ext-json": "*",

View file

@ -11,7 +11,7 @@ server {
location ~ \.php$ { location ~ \.php$ {
fastcgi_split_path_info ^(.+\.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; fastcgi_index index.php;
include fastcgi.conf; include fastcgi.conf;
} }

View file

@ -19,11 +19,7 @@ use function unlink;
class ImportShortUrlsTest extends CliTestCase class ImportShortUrlsTest extends CliTestCase
{ {
/** private false|string|null $tempCsvFile = null;
* @var false|string|null
* @todo Use native type once PHP 8.1 support is dropped
*/
private mixed $tempCsvFile = null;
protected function setUp(): void protected function setUp(): void
{ {

View file

@ -169,7 +169,6 @@ class ListShortUrlsTest extends ApiTestCase
public static function provideFilteredLists(): iterable 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) => [ $withDeviceLongUrls = static fn (array $shortUrl, ?array $longUrls = null) => [
...$shortUrl, ...$shortUrl,
'deviceLongUrls' => $longUrls ?? [ 'deviceLongUrls' => $longUrls ?? [