From 7a8d33ef469e15f759c4f3ca66cdda4c6565d61e Mon Sep 17 00:00:00 2001 From: tlsvda Date: Tue, 1 Feb 2022 13:12:12 +0100 Subject: [PATCH] Support PHP version 8.0 --- .github/workflows/test.yaml | 31 ++++++++++++++++++++++++++++++- composer.json | 2 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5c6ad05..15cc3eb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,7 +2,7 @@ name: Test on: push jobs: - test: + test-php7_2: runs-on: ubuntu-18.04 strategy: matrix: @@ -31,3 +31,32 @@ jobs: - name: Run tests run: make check + test-php8: + runs-on: ubuntu-18.04 + strategy: + matrix: + prefer: [ "prefer-stable", "prefer-lowest" ] + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + tools: composer:v2 + + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}-${{ matrix.prefer }}- + restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}- + - name: Composer Install + run: composer update --${{ matrix.prefer }} --no-interaction --no-progress --no-ansi + + - name: Run tests + run: make check diff --git a/composer.json b/composer.json index 5168132..ba94d50 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2||^8.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "escapestudios/symfony2-coding-standard": "^3.6", "phpmd/phpmd": "^2.9",