@@ -34,13 +34,13 @@ an **event bus**. The event bus could have zero or more subscribers.
34
34
middleware :
35
35
- validation
36
36
event.bus :
37
- # the 'allow_no_handlers' middleware allows to have no handler
38
- # configured for this bus without throwing an exception
39
- # the 'allow_no_senders' middleware allows to have no sender
40
- # configured for this bus without throwing an exception
41
37
default_middleware :
42
38
enabled : true
39
+ # set "allow_no_handlers" to true (default is false) to allow having
40
+ # no handler configured for this bus without throwing an exception
43
41
allow_no_handlers : false
42
+ # set "allow_no_senders" to false (default is true) to throw an exception
43
+ # if no sender is configured for this bus
44
44
allow_no_senders : true
45
45
middleware :
46
46
- validation
@@ -67,12 +67,12 @@ an **event bus**. The event bus could have zero or more subscribers.
67
67
<framework : bus name =" query.bus" >
68
68
<framework : middleware id =" validation" />
69
69
</framework : bus >
70
- <!-- the 'allow_no_handlers' middleware allows to have no handler
71
- configured for this bus without throwing an exception -->
72
- <!-- the 'allow_no_senders' middleware allows to have no sender
73
- configured for this bus without throwing an exception -->
74
70
<framework : bus name =" event.bus" >
75
- <framework : default-middleware enabled =" true" allow_no_handlers =" false" allow_no_senders =" true" />
71
+ <!-- set "allow-no-handlers" to true (default is false) to allow having
72
+ no handler configured for this bus without throwing an exception -->
73
+ <!-- set "allow-no-senders" to false (default is true) to throw an exception
74
+ if no sender is configured for this bus -->
75
+ <framework : default-middleware enabled =" true" allow-no-handlers =" false" allow-no-senders =" true" />
76
76
<framework : middleware id =" validation" />
77
77
</framework : bus >
78
78
</framework : messenger >
@@ -96,13 +96,13 @@ an **event bus**. The event bus could have zero or more subscribers.
96
96
$queryBus->middleware()->id('validation');
97
97
98
98
$eventBus = $framework->messenger()->bus('event.bus');
99
- // the 'allowNoHandlers' middleware allows to have no handler
100
- // configured for this bus without throwing an exception
101
- // the 'allowNoSenders' middleware allows to have no sender
102
- // configured for this bus without throwing an exception
103
99
$eventBus->defaultMiddleware()
104
100
->enabled(true)
101
+ // set "allowNoHandlers" to true (default is false) to allow having
102
+ // no handler configured for this bus without throwing an exception
105
103
->allowNoHandlers(false)
104
+ // set "allowNoSenders" to false (default is true) to throw an exception
105
+ // if no sender is configured for this bus
106
106
->allowNoSenders(true)
107
107
;
108
108
$eventBus->middleware()->id('validation');
0 commit comments