@@ -158,10 +158,16 @@ run when the container is compiled::
158
158
$container = new ContainerBuilder();
159
159
$container->addCompilerPass(new TransportCompilerPass);
160
160
161
+ .. note ::
162
+
163
+ Compiler passes are registered differently is you are using the full
164
+ stack framework, see :doc: `cookbook/service_container/compiler_passes `
165
+ for more details.
166
+
161
167
Adding additional attributes on Tags
162
168
------------------------------------
163
169
164
- Sometimes you need additional information about each service that's tagged with your tag.
170
+ Sometimes you need additional information about each service that's tagged with your tag.
165
171
For example, you might want to add an alias to each TransportChain.
166
172
167
173
To begin with, change the ``TransportChain `` class::
@@ -212,7 +218,7 @@ To answer this, change the service declaration:
212
218
class : \Swift_SendmailTransport
213
219
tags :
214
220
- { name: acme_mailer.transport, alias: bar }
215
-
221
+
216
222
217
223
.. code-block :: xml
218
224
@@ -224,7 +230,7 @@ To answer this, change the service declaration:
224
230
<service id =" acme_mailer.transport.sendmail" class =" \Swift_SendmailTransport" >
225
231
<tag name =" acme_mailer.transport" alias =" bar" />
226
232
</service >
227
-
233
+
228
234
Notice that you've added a generic ``alias `` key to the tag. To actually
229
235
use this, update the compiler::
230
236
0 commit comments