Skip to content

Commit 42b44c4

Browse files
committed
minor #4929 Remove block which doesn't make sense after best practices (ifdattic)
This PR was merged into the 2.3 branch. Discussion ---------- Remove block which doesn't make sense after best practices | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3 | Fixed tickets | Commits ------- 26415e2 Remove block which doesn't make sense after best practices
2 parents 0afc689 + 26415e2 commit 42b44c4

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

components/dependency_injection/parameters.rst

-43
Original file line numberDiff line numberDiff line change
@@ -140,49 +140,6 @@ rather than being tied up and hidden with the service definition:
140140
If you were using this elsewhere as well, then you would only need to change
141141
the parameter value in one place if needed.
142142

143-
You can also use the parameters in the service definition, for example,
144-
making the class of a service a parameter:
145-
146-
.. configuration-block::
147-
148-
.. code-block:: yaml
149-
150-
parameters:
151-
mailer.transport: sendmail
152-
153-
services:
154-
mailer:
155-
class: Mailer
156-
arguments: ["%mailer.transport%"]
157-
158-
.. code-block:: xml
159-
160-
<?xml version="1.0" encoding="UTF-8" ?>
161-
<container xmlns="http://symfony.com/schema/dic/services"
162-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
163-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
164-
165-
<parameters>
166-
<parameter key="mailer.transport">sendmail</parameter>
167-
</parameters>
168-
169-
<services>
170-
<service id="mailer" class="Mailer">
171-
<argument>%mailer.transport%</argument>
172-
</service>
173-
</services>
174-
</container>
175-
176-
.. code-block:: php
177-
178-
use Symfony\Component\DependencyInjection\Reference;
179-
180-
$container->setParameter('mailer.transport', 'sendmail');
181-
182-
$container
183-
->register('mailer', 'Mailer')
184-
->addArgument('%mailer.transport%');
185-
186143
.. note::
187144

188145
The percent sign inside a parameter or argument, as part of the string, must

0 commit comments

Comments
 (0)