Skip to content

Commit ee27765

Browse files
committed
Adding versionadded
1 parent bc7088d commit ee27765

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

controller.rst

+7
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ and many others that you'll learn about next.
149149
via ``$this->get()`` or ``$this->container->get()``. This forces you to write
150150
more robust code to access services, but if you're not use, use ``Controller``.
151151

152+
.. versionadded:: 3.3
153+
The ``AbstractController`` class was added in Symfony 3.3.
154+
152155
.. index::
153156
single: Controller; Redirecting
154157

@@ -237,6 +240,10 @@ The Symfony templating system and Twig are explained more in the
237240
Fetching Services as Arguments
238241
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239242

243+
.. versionadded:: 3.3
244+
The ability to type-hint an argument in order to receive a service was added
245+
in Symfony 3.3.
246+
240247
Symfony comes *packed* with a lot of useful objects, called :doc:`services </service_container>`.
241248
These are used for rendering templates, sending emails, querying the database and
242249
any other "work" you can think of.

service_container.rst

+15
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ service's class or interface name. Want to :doc:`log </logging>` something? No p
4343
// ...
4444
}
4545

46+
.. versionadded:: 3.3
47+
The ability to type-hint a service in order to receive it was added in Symfony 3.3.
48+
4649
.. _container-debug-container:
4750

4851
What other services are available? Find out by running:
@@ -177,6 +180,10 @@ the service container *how* to instantiate it:
177180
// app/config/services.php
178181
// _defaults and loading entire directories is not possible with PHP configuration
179182
183+
.. versionadded:: 3.3
184+
The ``_defaults`` key and ability to load services from a directory were added
185+
in Symfony 3.3.
186+
180187
That's it! Thanks to the ``AppBundle\`` line and ``resource`` key below it, a service
181188
will be registered for each class in the ``src/AppBundle/Service`` directory (and
182189
the other directories listed).
@@ -462,6 +469,11 @@ pass here. No problem! In your configuration, you can explicitly set this argume
462469
->setPublic(false)
463470
->setArgument('$adminEmail', 'manager@example.com');
464471
472+
.. versionadded:: 3.3
473+
The ability to configure an argument by its name (``$adminEmail``) was added
474+
in Symfony 3.3. Previously, you could configure it only by its index (``2`` in
475+
this case).
476+
465477
Thanks to this, the container will pass ``manager@example.com`` as the third argument
466478
to ``__construct`` when creating the ``SiteUpdateManager`` service. The other arguments
467479
will still be autowired.
@@ -641,6 +653,9 @@ service whose id is ``monolog.logger.request``.
641653
The autoconfigure Option
642654
------------------------
643655

656+
.. versionadded:: 3.3
657+
The ``autoconfigure`` option was added in Symfony 3.3.
658+
644659
Above, we've set ``autoconfigure: true`` in the ``_defaults`` section so that it
645660
applies to all services defined in that file. With this setting, the container will
646661
automatically apply certain configuration to your services, based on your service's

0 commit comments

Comments
 (0)