8000 Remove block which doesn't make sense after best practices · symfony/symfony-docs@26415e2 · GitHub
[go: up one dir, main page]

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

Appearance settings

Commit 26415e2

Browse files
committed
Remove block which doesn't make sense after best practices
| Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3 | Fixed tickets |
1 parent dc87147 commit 26415e2

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

components/dependency_injection/parameters.rst

Lines changed: 0 additions & 43 deletions
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)
0