Skip to content

Commit 72eb6b1

Browse files
#60 Fix PHP 8.1 restrictions
1 parent c91aed9 commit 72eb6b1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/Entity/ProcessSchedule.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ public function setContext(array $context): void
8787
$this->context = $context;
8888
}
8989

90-
public function getNextExecution(): null
90+
/**
91+
* PHP 8.1 Fatal error: Null can not be used as a standalone type.
92+
*
93+
* @phpstan-ignore missingType.return
94+
*/
95+
public function getNextExecution()
9196
{
9297
return null;
9398
}

src/Message/ProcessExecuteHandler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
use CleverAge\UiProcessBundle\Monolog\Handler\ProcessHandler;
1818
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
1919

20+
/**
21+
* PHP 8.2 : Replace by readonly class.
22+
*/
2023
#[AsMessageHandler]
21-
readonly class ProcessExecuteHandler
24+
class ProcessExecuteHandler
2225
{
23-
public function __construct(private ProcessManager $manager, private readonly ProcessHandler $processHandler)
26+
public function __construct(private readonly ProcessManager $manager, private readonly ProcessHandler $processHandler)
2427
{
2528
}
2629

0 commit comments

Comments
 (0)