Skip to content

Commit 5a3f81b

Browse files
ejunkerstayallive
andauthored
Prevent PHP 8.4 deprecation warning (#954)
* prevent PHP 8.4 deprecation for default null value without nullable type declaration * Add php-cs-fixer rule to prevent nullable deprecations --------- Co-authored-by: Alex Bouma <[email protected]>
1 parent c26ecb6 commit 5a3f81b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
$config
1010
->setRules([
1111
'@PSR2' => true,
12+
'nullable_type_declaration_for_default_null_value' => true,
1213
])
1314
->setFinder($finder)
1415
;

src/Sentry/Laravel/Features/ConsoleSchedulingIntegration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private function sendCheckIn(CheckIn $checkIn): void
212212
SentrySdk::getCurrentHub()->captureEvent($event);
213213
}
214214

215-
private function createCheckIn(string $slug, CheckInStatus $status, string $id = null): CheckIn
215+
private function createCheckIn(string $slug, CheckInStatus $status, ?string $id = null): CheckIn
216216
{
217217
$options = SentrySdk::getCurrentHub()->getClient()->getOptions();
218218

0 commit comments

Comments
 (0)