From ed5ef8078396f741fe61b5f5a8780b4b29dd4d22 Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Wed, 7 Dec 2022 07:43:31 -0500 Subject: [PATCH] Add PHP 8.2 Support (#196) * add php 8.2 to workflow * update tests to support L8 * Fix styling --- .github/workflows/run-tests.yml | 4 ++-- tests/FeedTest.php | 2 +- tests/Pest.php | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f00a7bd..5f0dbe9 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.1, 8.0] + php: [8.2, 8.1, 8.0] laravel: [9.*, 8.*] dependency-version: [prefer-stable] include: @@ -33,7 +33,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.63" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest - name: Execute tests diff --git a/tests/FeedTest.php b/tests/FeedTest.php index 996fa45..5717f26 100644 --- a/tests/FeedTest.php +++ b/tests/FeedTest.php @@ -87,7 +87,7 @@ $response->assertStatus(200); expect( - str($response->headers->get('content-type'))->before(';')->value() + (string)(str($response->headers->get('content-type'))->before(';')) )->toBe($contentType); }); }); diff --git a/tests/Pest.php b/tests/Pest.php index c0f1021..2460df3 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,3 +1,10 @@ in('.'); + +if (! function_exists('str')) { + function str($string) + { + return \Illuminate\Support\Str::of($string); + } +}