From 9ba65f36e52b9e5e301751045790faa2e071c1c3 Mon Sep 17 00:00:00 2001 From: Christopher Gammie Date: Tue, 26 Nov 2024 16:47:42 +0000 Subject: [PATCH] fix: remove more php 8.4 deprecation notices --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 4 ++++ phpunit.xml | 1 + src/TestResponse.php | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c7d521d..3f0b631 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2, 8.3] + php: [8.2, 8.3, 8.4] steps: - name: Checkout Code diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bed379..83a2a79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. This projec ## Unreleased +### Fixed + +- Remove deprecation notices on PHP 8.4. + ## [3.0.0] - 2024-03-12 ### Changed diff --git a/phpunit.xml b/phpunit.xml index c2d37a1..215e292 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -13,6 +13,7 @@ failOnWarning="true" failOnDeprecation="true" failOnNotice="true" + displayDetailsOnTestsThatTriggerDeprecations="true" > diff --git a/src/TestResponse.php b/src/TestResponse.php index af8af90..a93e592 100644 --- a/src/TestResponse.php +++ b/src/TestResponse.php @@ -41,7 +41,7 @@ public static function cast($response): self * @param Response $response * @param string|null $expectedType */ - public function __construct($response, string $expectedType = null) + public function __construct($response, ?string $expectedType = null) { parent::__construct($response); @@ -116,7 +116,7 @@ public function getLocation(): ?string * @param string|null $pointer * @return Document|mixed */ - public function jsonApi(string $pointer = null) + public function jsonApi(?string $pointer = null) { $document = $this->getDocument();