From 48fc63fe02363af3ac3baa5c8fcf1a21d84a5336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 6 Jan 2023 02:38:31 +0100 Subject: [PATCH 1/2] switch to PHP 8.2 --- Dockerfile | 3 +-- composer.json | 2 +- phpstan.neon | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73a052d5..5dfe442c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ # add amd64 platform to support Mac M1 FROM --platform=linux/amd64 shivammathur/node:latest-amd64 -# todo update this to 8.2 once shivammathur/node supports that -ARG PHP_VERSION=8.1 +ARG PHP_VERSION=8.2 WORKDIR /var/www/html diff --git a/composer.json b/composer.json index 098b1cc4..0cfe3984 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "ext-json": "*", "illuminate/support": "^9.0", "spatie/ignition": "^1.4", diff --git a/phpstan.neon b/phpstan.neon index 6a864833..7ae06b44 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -48,10 +48,8 @@ parameters: paths: - src/Database/DatabaseConfig.php - '#Method Stancl\\Tenancy\\Tenancy::cachedResolvers\(\) should return array#' - - # php 8.2 - # - '#Access to an undefined property Stancl\\Tenancy\\Middleware\\IdentificationMiddleware\:\:\$tenancy#' - # - '#Access to an undefined property Stancl\\Tenancy\\Middleware\\IdentificationMiddleware\:\:\$resolver#' + - '#Access to an undefined property Stancl\\Tenancy\\Middleware\\IdentificationMiddleware\:\:\$tenancy#' + - '#Access to an undefined property Stancl\\Tenancy\\Middleware\\IdentificationMiddleware\:\:\$resolver#' checkMissingIterableValueType: false treatPhpDocTypesAsCertain: false From 21d55ef4726cca70179842c3d26266602f8bbdfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 6 Jan 2023 02:44:37 +0100 Subject: [PATCH 2/2] add setup-php to phpstan job --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 724aed35..dc61273d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,6 +107,11 @@ jobs: name: Static analysis (PHPStan) runs-on: ubuntu-latest steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: imagick, swoole - uses: actions/checkout@v2 - name: Install composer dependencies run: composer install