File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -127,12 +127,12 @@ You can configure the service configurator using the ``configurator`` option:
127127 app.newsletter_manager :
128128 class : AppBundle\Mail\NewsletterManager
129129 arguments : ['@mailer']
130- configurator : ['@ app.email_configurator', configure]
130+ configurator : ' app.email_configurator: configure'
131131
132132 app.greeting_card_manager :
133133 class : AppBundle\Mail\GreetingCardManager
134134 arguments : ['@mailer']
135- configurator : ['@ app.email_configurator', configure]
135+ configurator : ' app.email_configurator: configure'
136136
137137 .. code-block :: xml
138138
@@ -186,6 +186,23 @@ You can configure the service configurator using the ``configurator`` option:
186186 ->setConfigurator(array(new Reference('app.email_configurator'), 'configure'))
187187 ;
188188
189+ .. note ::
190+
191+ The traditional configurator syntax in YAML files used an array to define
192+ the service id and the method name:
193+
194+ .. code-block :: yaml
195+
196+ app.newsletter_manager :
197+ # new syntax
198+ configurator : ' app.email_configurator:configure'
199+ # old syntax
200+ configurator : ['@app.email_configurator', configure]
201+
202+ .. versionadded :: 3.2
203+ The ``service_id:method_name `` syntax for the YAML configuration format
204+ was introduced in Symfony 3.2.
205+
189206That's it! When requesting the ``app.newsletter_manager `` or
190207``app.greeting_card_manager `` service, the created instance will first be
191208passed to the ``EmailConfigurator::configure() `` method.
You can’t perform that action at this time.
0 commit comments