Skip to content

Commit f16e631

Browse files
DonCallistojaviereguiluz
authored andcommitted
Update 3.3-di-changes.rst
1 parent a0bec48 commit f16e631

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

service_container/3.3-di-changes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,13 @@ Start by updating the service ids to class names:
585585
account when looking up for services.
586586
Furthermore it is always recommended to check for definition existence
587587
using ``has()`` function.
588+
589+
.. note::
590+
591+
If you get rid of deprecations and extend ``AbstractController`` instead of ``Controller`` for
592+
your controllers, you can skip the rest of this step as `AbstractController` won't provide a
593+
container where you can get the services directly. All services need to be injected as explained
594+
in the :ref:`step 5 of this article <step-5>`.
588595

589596
But, this change will break our app! The old service ids (e.g. ``app.github_notifier``)
590597
no longer exist. The simplest way to fix this is to find all your old service ids
@@ -716,6 +723,8 @@ will be used. If you *don't* have this, the auto-registration feature will try t
716723
register a third ``ApiClient`` service and use that for autowiring (which will fail,
717724
because the class has a non-autowireable argument).
718725

726+
.. _step-5:
727+
719728
Step 5) Cleanup!
720729
~~~~~~~~~~~~~~~~
721730

0 commit comments

Comments
 (0)