Skip to content

Commit 4e19ee5

Browse files
committed
use throwable interface
1 parent e85c6df commit 4e19ee5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/FormBuilderBundle/Event/OutputWorkflow/OutputWorkflowSignalsEvent.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
class OutputWorkflowSignalsEvent extends Event
99
{
1010
protected array $signals;
11-
protected ?\Exception $exception;
11+
protected ?\Throwable $exception;
1212

13-
public function __construct(array $signals, ?\Exception $exception)
13+
public function __construct(array $signals, ?\Throwable $exception)
1414
{
1515
$this->signals = $signals;
1616
$this->exception = $exception;
1717
}
1818

1919
public function hasException(): bool
2020
{
21-
return $this->exception instanceof \Exception;
21+
return $this->exception instanceof \Throwable;
2222
}
2323

2424
public function hasGuardException(): bool
@@ -28,7 +28,7 @@ public function hasGuardException(): bool
2828
$this->exception instanceof OutputWorkflow\GuardStackedException;
2929
}
3030

31-
public function getException(): ?\Exception
31+
public function getException(): ?\Throwable
3232
{
3333
return $this->exception;
3434
}

src/FormBuilderBundle/OutputWorkflow/OutputWorkflowDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function dispatch(OutputWorkflowInterface $outputWorkflow, SubmissionEven
7070
$this->dispatchSignalsEvent();
7171
}
7272

73-
protected function dispatchSignalsEvent(?\Exception $exception = null): void
73+
protected function dispatchSignalsEvent(?\Throwable $exception = null): void
7474
{
7575
$signals = $this->subscriber->getSignals();
7676
$this->eventDispatcher->removeSubscriber($this->subscriber);

0 commit comments

Comments
 (0)