Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 86f3195

Browse filesBrowse files
committed
fix: remove deprecation notices from php 8.4
1 parent 158537d commit 86f3195
Copy full SHA for 86f3195

File tree

Expand file treeCollapse file tree

9 files changed

+14
-9
lines changed
Filter options
Expand file treeCollapse file tree

9 files changed

+14
-9
lines changed

‎.github/workflows/tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/tests.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: [8.2, 8.3]
17+
php: [8.2, 8.3, 8.4]
1818
laravel: [10, 11]
1919
phpunit: [10.5, 11]
2020

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. This projec
55

66
## Unreleased
77

8+
### Fixed
9+
10+
- Remove deprecation notices from PHP 8.4.
11+
812
## [6.0.0] - 2024-03-12
913

1014
### Changed

‎phpunit.xml

Copy file name to clipboardExpand all lines: phpunit.xml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
failOnWarning="true"
1414
failOnDeprecation="false"
1515
failOnNotice="true"
16+
displayDetailsOnTestsThatTriggerDeprecations="true"
1617
>
1718
<coverage/>
1819
<testsuites>

‎src/Constraints/HttpStatusIsSuccessful.php

Copy file name to clipboardExpand all lines: src/Constraints/HttpStatusIsSuccessful.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class HttpStatusIsSuccessful extends Constraint
3232
*
3333
* @param string|null $content
3434
*/
35-
public function __construct(string $content = null)
35+
public function __construct(?string $content = null)
3636
{
3737
$this->content = $content;
3838
}

‎src/Constraints/OnlyExactInList.php

Copy file name to clipboardExpand all lines: src/Constraints/OnlyExactInList.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class OnlyExactInList extends OnlySubsetsInList
2626
/**
2727
* @inheritdoc
2828
*/
29-
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): never
29+
protected function fail($other, $description, ?ComparisonFailure $comparisonFailure = null): never
3030
{
3131
$comparisonFailure = Compare::failure(
3232
$this->expected,

‎src/Constraints/OnlyIdentifiersInList.php

Copy file name to clipboardExpand all lines: src/Constraints/OnlyIdentifiersInList.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class OnlyIdentifiersInList extends OnlySubsetsInList
2626
/**
2727
* @inheritdoc
2828
*/
29-
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): never
29+
protected function fail($other, $description, ?ComparisonFailure $comparisonFailure = null): never
3030
{
3131
$comparisonFailure = Compare::failure(
3232
$this->expected,

‎src/Constraints/OnlySubsetsInList.php

Copy file name to clipboardExpand all lines: src/Constraints/OnlySubsetsInList.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function toString(): string
9292
/**
9393
* @inheritdoc
9494
*/
95-
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): never
95+
protected function fail($other, $description, ?ComparisonFailure $comparisonFailure = null): never
9696
{
9797
if (!$comparisonFailure) {
9898
$comparisonFailure = Compare::failure(

‎src/HttpAssert.php

Copy file name to clipboardExpand all lines: src/HttpAssert.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class HttpAssert
5050
public static function assertStatusCode(
5151
$status,
5252
int $expected,
53-
string $content = null,
53+
?string $content = null,
5454
string $message = ''
5555
): void
5656
{
@@ -562,7 +562,7 @@ public static function assertAcceptedWithId(
562562
* @param string $message
563563
* @return void
564564
*/
565-
public static function assertNoContent($status, string $content = null, string $message = ''): void
565+
public static function assertNoContent($status, ?string $content = null, string $message = ''): void
566566
{
567567
self::assertStatusCode($status, self::STATUS_NO_CONTENT, $content, $message);
568568
PHPUnitAssert::assertEmpty($content, $message ?: 'Expecting HTTP body content to be empty.');

‎src/HttpMessage.php

Copy file name to clipboardExpand all lines: src/HttpMessage.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class HttpMessage implements ArrayAccess
5252
*/
5353
public function __construct(
5454
int $status,
55-
string $contentType = null,
56-
string $content = null,
55+
?string $contentType = null,
56+
?string $content = null,
5757
array $headers = []
5858
) {
5959
$this->status = $status;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.