Skip to content

Commit a18a687

Browse files
Use str_increment() to fix PHP 8.5 deprecation
1 parent 6bcfa22 commit a18a687

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Worker/Internal/TaskSubmission.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ final class TaskSubmission extends JobPacket
1414
public function __construct(Task $task)
1515
{
1616
$this->task = $task;
17-
parent::__construct(self::$nextId++);
17+
$id = self::$nextId;
18+
\PHP_VERSION_ID >= 80300 ? self::$nextId = str_increment(self::$nextId) : ++self::$nextId;
19+
parent::__construct($id);
1820
}
1921

2022
public function getTask(): Task

0 commit comments

Comments
 (0)