Drop support for PHP 8.1

This commit is contained in:
Alejandro Celaya 2023-05-29 09:43:12 +02:00
parent 07ce5f05a2
commit ee6a8ede0a
12 changed files with 32 additions and 20 deletions

View File

@ -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: |

View File

@ -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'

View File

@ -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: |

View File

@ -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

View File

@ -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

View File

@ -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

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).
## [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.

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.
## 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.

View File

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

View File

@ -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;
}

View File

@ -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
{

View File

@ -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 ?? [