Skip to content

Commit 9abddaa

Browse files
authored
Merge pull request #1351 from ashleyshenton/php-8.4
fix: php 8.4 deprecation warnings
2 parents 779b0a1 + b774849 commit 9abddaa

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/advanced-usage/batch-logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Activity::forBatch($uuid)->get(); // all the activity that happend in the batch
127127
```php
128128
class SomeJob
129129
{
130-
public function handle(string $value, string $batchUuid = null)
130+
public function handle(string $value, ?string $batchUuid = null)
131131
{
132132
LogBatch::startBatch();
133133
if($batchUuid) LogBatch::setBatch($batchUuid);

src/ActivityLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function inLog(?string $logName): static
133133
return $this->useLog($logName);
134134
}
135135

136-
public function tap(callable $callback, string $eventName = null): static
136+
public function tap(callable $callback, ?string $eventName = null): static
137137
{
138138
call_user_func($callback, $this->getActivity(), $eventName);
139139

src/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use Spatie\Activitylog\ActivityLogStatus;
55

66
if (! function_exists('activity')) {
7-
function activity(string $logName = null): ActivityLogger
7+
function activity(?string $logName = null): ActivityLogger
88
{
99
$defaultLogName = config('activitylog.default_log_name');
1010

0 commit comments

Comments
 (0)