From dba5f173794669cd5ce3f6487f77bcc51f6639df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bouc=CC=8Cek?= Date: Sat, 9 Sep 2023 11:27:11 +0200 Subject: [PATCH 1/2] Add PHP 8.2 support --- .github/workflows/code-analysis.yaml | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-analysis.yaml b/.github/workflows/code-analysis.yaml index 2a03ac1..31d38e8 100644 --- a/.github/workflows/code-analysis.yaml +++ b/.github/workflows/code-analysis.yaml @@ -18,6 +18,7 @@ jobs: php: - "8.0" - "8.1" + - "8.2" name: "PHPStan at PHP ${{ matrix.php }}" runs-on: "ubuntu-latest" diff --git a/composer.json b/composer.json index 49e9961..70994c6 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^8.0 || ^8.1", + "php": "^8.0", "nette/utils": "^3.2", "php-http/discovery": "^1.14", "php-http/message": "^1.13", From 9e02b33001f710c36c30dcda9421bbbc658c41ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bouc=CC=8Cek?= Date: Sat, 9 Sep 2023 11:37:05 +0200 Subject: [PATCH 2/2] GitHub workflow: Modernize --- .github/workflows/code-analysis.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-analysis.yaml b/.github/workflows/code-analysis.yaml index 31d38e8..93bb409 100644 --- a/.github/workflows/code-analysis.yaml +++ b/.github/workflows/code-analysis.yaml @@ -32,8 +32,19 @@ jobs: php-version: "${{ matrix.php }}" coverage: "none" - - name: "Install dependencies (Composer)" - uses: "ramsey/composer-install@v2" + - name: Get Composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install Composer dependencies + run: composer update --no-progress - name: "Statically analyze code (PHPStan)" - run: "composer phpstan -- --ansi" + run: "composer run phpstan -- --ansi"