File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,16 @@ class AsyncEventDispatcher implements EventDispatcherInterface
32
32
33
33
/**
34
34
* @param ListenerProviderInterface $listenerProvider The provider of event listeners
35
- * @param Closure (Throwable): (void) $errorHandler The handler for errors thrown by listeners
35
+ * @param callable (Throwable): (void) $errorHandler The handler for errors thrown by listeners
36
36
*/
37
37
public function __construct (
38
38
private readonly ListenerProviderInterface $ listenerProvider ,
39
- ?Closure $ errorHandler = null
39
+ ?callable $ errorHandler = null
40
40
) {
41
41
if ($ errorHandler === null ) {
42
42
$ this ->errorHandler = function (Throwable $ exception ): void {};
43
43
} else {
44
- $ this ->errorHandler = $ errorHandler ;
44
+ $ this ->errorHandler = Closure:: fromCallable ( $ errorHandler) ;
45
45
}
46
46
}
47
47
You can’t perform that action at this time.
0 commit comments