8000 minor #3793 language tweak for the tip introduced in #3743 (xabbuh) · symfony/symfony-docs@1a6f730 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a6f730

Browse files
committed
minor #3793 language tweak for the tip introduced in #3743 (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- language tweak for the tip introduced in #3743 | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | Commits ------- deb5d71 language tweak for the tip introduced in #3743
2 parents dda9e88 + deb5d71 commit 1a6f730

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

components/dependency_injection/parentservices.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ a parent for a service.
242242
use Symfony\Component\DependencyInjection\Reference;
243243
244244
// ...
245-
245+
246246
$mailManager = new Definition();
247247
$mailManager
248248
->setAbstract(true);
@@ -254,11 +254,11 @@ a parent for a service.
254254
))
255255
;
256256
$container->setDefinition('mail_manager', $mailManager);
257-
257+
258258
$newsletterManager = new DefinitionDecorator('mail_manager');
259259
$newsletterManager->setClass('%newsletter_manager.class%');
260260
$container->setDefinition('newsletter_manager', $newsletterManager);
261-
261+
262262
$greetingCardManager = new DefinitionDecorator('mail_manager');
263263
$greetingCardManager->setClass('%greeting_card_manager.class%');
264264
$container->setDefinition('greeting_card_manager', $greetingCardManager);
@@ -291,13 +291,13 @@ would cause an exception to be raised for a non-abstract service.
291291
In order for parent dependencies to resolve, the ``ContainerBuilder`` must
292292
first be compiled. See :doc:`/components/dependency_injection/compilation`
293293
for more details.
294-
294+
295295
.. tip::
296296

297-
In the examples shown, the classes sharing the same configuration also extend
298-
from the same parent in PHP. This does not need to be the case though, you can
299-
extract common parts of similar service definitions into a parent service without
300-
also extending a parent class in PHP.
297+
In the examples shown, the classes sharing the same configuration also
298+
extend from the same parent class in PHP. This isn't necessary at all.
299+
You can just extract common parts of similar service definitions into
300+
a parent service without also extending a parent class in PHP.
301301

302302
Overriding Parent Dependencies
303303
------------------------------
@@ -377,7 +377,7 @@ to the ``NewsletterManager`` class, the config would look like this:
377377
378378
// ...
379379
$container->setDefinition('my_alternative_mailer', ...);
380-
380+
381381
$mailManager = new Definition();
382382
$mailManager
383383
->setAbstract(true);

0 commit comments

Comments
 (0)
0