From b00fe8cf741766b41de69978f9e90ee6d1470d36 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 8 Nov 2022 13:44:02 +0100 Subject: [PATCH] PHP 8.2 support (#463) * Allow PHP 8.2 * Update workflow for PHP 8.2 * Formatting * Set minimum PHP 8.2 versions Co-authored-by: Jonathan Reinink --- .github/workflows/tests.yml | 29 ++++++++++++++++++++++------- composer.json | 2 +- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a7ebfe07..0f9ae588 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,7 +4,7 @@ on: push: pull_request: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" jobs: tests: @@ -12,9 +12,9 @@ jobs: strategy: fail-fast: true matrix: - php: [ 7.2, 7.3, 7.4, '8.0', 8.1 ] - laravel: [ 6, 7, 8, 9 ] - stability: ['prefer-lowest', 'prefer-stable'] + php: [7.2, 7.3, 7.4, "8.0", 8.1, 8.2] + laravel: [6, 7, 8, 9] + stability: ["prefer-lowest", "prefer-stable"] exclude: - php: 7.2 laravel: 8 @@ -28,6 +28,12 @@ jobs: laravel: 6 - php: 8.1 laravel: 7 + - php: 8.2 + laravel: 6 + - php: 8.2 + laravel: 7 + - php: 8.2 + laravel: 8 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} (w/ ${{ matrix.stability }}) steps: @@ -42,7 +48,7 @@ jobs: ini-values: error_reporting=E_ALL tools: composer:v2 coverage: none - + - name: Set Minimum PHP 8.1 Versions uses: nick-invision/retry@v1 with: @@ -52,14 +58,23 @@ jobs: composer require phpunit/phpunit:^9.5.8 --dev --${{ matrix.stability }} --no-update --no-interaction composer require vlucas/phpdotenv:^5.3.1 --${{ matrix.stability }} --no-update --no-interaction if: matrix.php >= 8.1 && matrix.stability == 'prefer-lowest' - + + - name: Set Minimum PHP 8.2 Versions + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: | + composer require nesbot/carbon:^2.62.1 --dev --${{ matrix.stability }} --no-update --no-interaction + if: matrix.php >= 8.2 && matrix.stability == 'prefer-lowest' + - name: Set Laravel version uses: nick-invision/retry@v1 with: timeout_minutes: 5 max_attempts: 5 command: composer require "laravel/framework=^${{ matrix.laravel }}" --no-interaction --no-update - + - name: Install dependencies uses: nick-invision/retry@v1 with: diff --git a/composer.json b/composer.json index 81c23468..6f2dec14 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ } }, "require": { - "php": "^7.2|~8.0.0|~8.1.0", + "php": "^7.2|~8.0.0|~8.1.0|~8.2.0", "ext-json": "*", "laravel/framework": "^6.0|^7.0|^8.74|^9.0" },