Skip to content

Commit

Permalink
Prevent PHP 8.4 deprecation warning (#954)
Browse files Browse the repository at this point in the history
* 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 <alex@bouma.me>
  • Loading branch information
ejunker and stayallive authored Nov 24, 2024
1 parent c26ecb6 commit 5a3f81b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
$config
->setRules([
'@PSR2' => true,
'nullable_type_declaration_for_default_null_value' => true,
])
->setFinder($finder)
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private function sendCheckIn(CheckIn $checkIn): void
SentrySdk::getCurrentHub()->captureEvent($event);
}

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

Expand Down

0 comments on commit 5a3f81b

Please sign in to comment.