Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b589ff

Browse files
committed
Added PHP and XML config
1 parentaba0edf commit9b589ff

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

‎messenger/message-recorder.rst‎

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ sure ``dispatch_after_current_bus`` is registered before ``doctrine_transaction`
5353
in the middleware chain.
5454

5555
**Note:** The ``dispatch_after_current_bus`` middleware must be loaded for *all* of the
56-
buses. For the example, the middleware must be loaded for both the command and eventbuses.
56+
buses. For the example, the middleware must be loaded for both the command and eventbus.
5757

5858
..configuration-block::
5959

@@ -75,6 +75,47 @@ buses. For the example, the middleware must be loaded for both the command and e
7575
-validation
7676
-doctrine_transaction
7777
78+
..code-block::xml
79+
80+
<!-- config/packages/cache.xml-->
81+
<?xml version="1.0" encoding="UTF-8" ?>
82+
<containerxmlns="http://symfony.com/schema/dic/services"
83+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
84+
xmlns:framework="http://symfony.com/schema/dic/symfony"
85+
xsi:schemaLocation="http://symfony.com/schema/dic/services
86+
https://symfony.com/schema/dic/services/services-1.0.xsd">
87+
88+
<framework:config>
89+
<framework:messengerdefault_bus="messenger.bus.command">
90+
<framework:busname="messenger.bus.command">
91+
<framework:middlewareid="validation">
92+
<framework:middlewareid="doctrine_transaction">
93+
</framework:bus>
94+
<framework:busname="messenger.bus.command"default_middleware="allow_no_handlers">
95+
<framework:middlewareid="validation">
96+
<framework:middlewareid="doctrine_transaction">
97+
</framework:bus>
98+
</framework:messenger>
99+
</framework:config>
100+
</container>
101+
102+
..code-block::php
103+
104+
// config/packages/cache.php
105+
$container->loadFromExtension('framework', [
106+
'messenger' => [
107+
'default_bus' => 'messenger.bus.command',
108+
'buses' => [
109+
'messenger.bus.command' => [
110+
'middleware' => ['validation', 'doctrine_transaction'],
111+
],
112+
'messenger.bus.event' => [
113+
'default_middleware' => 'allow_no_handlers',
114+
'middleware' => ['validation', 'doctrine_transaction'],
115+
],
116+
],
117+
],
118+
]);
78119
79120
..code-block::php
80121

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp