diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index d7df713..8e86b1a 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]
laravel: [10, 11]
phpunit: [10.5, 11]
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fc2d3d6..fceb026 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 from PHP 8.4.
+
## [6.0.0] - 2024-03-12
### Changed
diff --git a/phpunit.xml b/phpunit.xml
index 40e1cf0..04eb77c 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -13,6 +13,7 @@
failOnWarning="true"
failOnDeprecation="false"
failOnNotice="true"
+ displayDetailsOnTestsThatTriggerDeprecations="true"
>
diff --git a/src/Constraints/HttpStatusIsSuccessful.php b/src/Constraints/HttpStatusIsSuccessful.php
index f9f6e45..d9c24e2 100644
--- a/src/Constraints/HttpStatusIsSuccessful.php
+++ b/src/Constraints/HttpStatusIsSuccessful.php
@@ -32,7 +32,7 @@ class HttpStatusIsSuccessful extends Constraint
*
* @param string|null $content
*/
- public function __construct(string $content = null)
+ public function __construct(?string $content = null)
{
$this->content = $content;
}
diff --git a/src/Constraints/OnlyExactInList.php b/src/Constraints/OnlyExactInList.php
index 705a8d4..c2d5c70 100644
--- a/src/Constraints/OnlyExactInList.php
+++ b/src/Constraints/OnlyExactInList.php
@@ -26,7 +26,7 @@ class OnlyExactInList extends OnlySubsetsInList
/**
* @inheritdoc
*/
- protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): never
+ protected function fail($other, $description, ?ComparisonFailure $comparisonFailure = null): never
{
$comparisonFailure = Compare::failure(
$this->expected,
diff --git a/src/Constraints/OnlyIdentifiersInList.php b/src/Constraints/OnlyIdentifiersInList.php
index a9e3e0c..f5e85b6 100644
--- a/src/Constraints/OnlyIdentifiersInList.php
+++ b/src/Constraints/OnlyIdentifiersInList.php
@@ -26,7 +26,7 @@ class OnlyIdentifiersInList extends OnlySubsetsInList
/**
* @inheritdoc
*/
- protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): never
+ protected function fail($other, $description, ?ComparisonFailure $comparisonFailure = null): never
{
$comparisonFailure = Compare::failure(
$this->expected,
diff --git a/src/Constraints/OnlySubsetsInList.php b/src/Constraints/OnlySubsetsInList.php
index defbc2d..47a39cc 100644
--- a/src/Constraints/OnlySubsetsInList.php
+++ b/src/Constraints/OnlySubsetsInList.php
@@ -92,7 +92,7 @@ public function toString(): string
/**
* @inheritdoc
*/
- protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): never
+ protected function fail($other, $description, ?ComparisonFailure $comparisonFailure = null): never
{
if (!$comparisonFailure) {
$comparisonFailure = Compare::failure(
diff --git a/src/HttpAssert.php b/src/HttpAssert.php
index e5764f0..4af0ac7 100644
--- a/src/HttpAssert.php
+++ b/src/HttpAssert.php
@@ -50,7 +50,7 @@ class HttpAssert
public static function assertStatusCode(
$status,
int $expected,
- string $content = null,
+ ?string $content = null,
string $message = ''
): void
{
@@ -562,7 +562,7 @@ public static function assertAcceptedWithId(
* @param string $message
* @return void
*/
- public static function assertNoContent($status, string $content = null, string $message = ''): void
+ public static function assertNoContent($status, ?string $content = null, string $message = ''): void
{
self::assertStatusCode($status, self::STATUS_NO_CONTENT, $content, $message);
PHPUnitAssert::assertEmpty($content, $message ?: 'Expecting HTTP body content to be empty.');
diff --git a/src/HttpMessage.php b/src/HttpMessage.php
index 7af7caf..0a4d06c 100644
--- a/src/HttpMessage.php
+++ b/src/HttpMessage.php
@@ -52,8 +52,8 @@ class HttpMessage implements ArrayAccess
*/
public function __construct(
int $status,
- string $contentType = null,
- string $content = null,
+ ?string $contentType = null,
+ ?string $content = null,
array $headers = []
) {
$this->status = $status;