Skip to content

Commit 75ca6e5

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

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

psalm.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
</errorLevel>
4242
</UndefinedClass>
4343

44+
<UndefinedFunction>
45+
<errorLevel type="suppress">
46+
<directory name="src/Worker/Internal"/>
47+
</errorLevel>
48+
</UndefinedFunction>
49+
4450
<UnsupportedPropertyReferenceUsage>
4551
<errorLevel type="suppress">
4652
<directory name="src"/>

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)