Skip to content

Commit c8e1c96

Browse files
committed
Tweaks thanks to Javier's reviews
1 parent 86ab47a commit c8e1c96

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

bundles/best_practices.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ For example, AcmeBlogBundle services must be prefixed with ``acme_blog``.
386386
In addition, services not meant to be used by the application directly, should
387387
be :ref:`defined as private <container-private-services>`. For public services,
388388
:ref:`aliases should be created <service-autowiring-alias>` from the interface/class
389-
to the service id. For example, in MonlogBundle, an alias is created from
389+
to the service id. For example, in MonologBundle, an alias is created from
390390
``Psr\Log\LoggerInterface`` to ``logger`` so that the ``LoggerInterface`` type-hint
391391
can be used for autowiring.
392392

console/commands_as_services.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ How to Define Commands as Services
66

77
If you're using the :ref:`default services.yml configuration <service-container-services-load-example>`,
88
your command classes are already registered as services. Great! This is the recommended
9-
setup, but it's not required. Symfony also looks in the ``Command`` directory of
9+
setup, but it's not required. Symfony also looks in the ``Command/`` directory of
1010
each bundle and automatically registers those classes as commands.
1111

1212
.. note::
1313

14-
You can also manually register your command as a service by configure the service
14+
You can also manually register your command as a service by configuring the service
1515
and :doc:`tagging it </service_container/tags>` with ``console.command``.
1616

1717
In either case, if your class extends :class:`Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand`,
@@ -45,7 +45,7 @@ For example, suppose you want to log something from within your command::
4545
{
4646
$this
4747
->setName('app:sunshine')
48-
->setDescription('Hello PhpStorm');
48+
->setDescription('Good morning!');
4949
}
5050

5151
protected function execute(InputInterface $input, OutputInterface $output)

controller/service.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ How to Define Controllers as Services
77
In Symfony, a controller does *not* need to be registered as a service. But if you're
88
using the :ref:`default services.yml configuration <service-container-services-load-example>`,
99
your controllers *are* already registered as services. This means you can use dependency
10-
injection line any other normal service.
10+
injection like any other normal service.
1111

1212
Referencing your Service from Routing
1313
-------------------------------------
@@ -88,8 +88,8 @@ When using a controller defined as a service, you can still extend any of the
8888
use their shortcuts. But, you don't need to! You can choose to extend *nothing*,
8989
and use dependency injection to access difference services.
9090

91-
The base `Controller class source code`_ is a great way to see how to performance
92-
simple tasks. For example, ``$this->render()`` is usually used to render a Twig
91+
The base `Controller class source code`_ is a great way to see how to accomplish
92+
common tasks. For example, ``$this->render()`` is usually used to render a Twig
9393
template and return a Response. But, you can also do this directly:
9494

9595
In a controller that's defined as a service, you can instead inject the ``templating``
@@ -112,7 +112,7 @@ service and use it directly::
112112
public function indexAction($name)
113113
{
114114
$content = $this->twig->renderResponse(
115-
'hellp/index.html.twig',
115+
'hello/index.html.twig',
116116
array('name' => $name)
117117
);
118118

@@ -130,7 +130,7 @@ The best way to see how to replace base ``Controller`` convenience methods is to
130130
look at the `ControllerTrait`_ that holds its logic.
131131

132132
If you want to know what type-hints to use for each service, see the
133-
``getSubscribedEvents`` in `AbstractController`_.
133+
``getSubscribedEvents()`` method in `AbstractController`_.
134134

135135
.. _`Controller class source code`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php
136136
.. _`base Controller class`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php

service_container/service_decoration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ the original service is lost:
4848
$container->register('app.mailer', DecoratingMailer::class);
4949
5050
Most of the time, that's exactly what you want to do. But sometimes,
51-
you might want to decorate the old service instead: keeping the old service so
51+
you might want to decorate the old service instead and keep the old service so
5252
that you can reference it:
5353

5454
.. configuration-block::

0 commit comments

Comments
 (0)