You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: service_container/3.3-di-changes.rst
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -567,6 +567,12 @@ Start by updating the service ids to class names:
567
567
classes (e.g. ``Twig_Extensions_Extension_Intl`` instead of ``Twig\Extensions\IntlExtension``),
568
568
you can't redefine the service as ``Twig_Extensions_Extension_Intl: ~`` and
569
569
you must keep the original ``class`` parameter.
570
+
571
+
.. caution::
572
+
573
+
If a service is processed by `Compiler Pass`_ you could face a "You have requested a non-existent service" error.
574
+
To get rid of this, be sure that Compiler Pass is using ``findDefinition`` instead of ``getDefinition`` as the latter
575
+
won't take aliases into account when looking up for services.
570
576
571
577
But, this change will break our app! The old service ids (e.g. ``app.github_notifier``)
572
578
no longer exist. The simplest way to fix this is to find all your old service ids
@@ -778,3 +784,5 @@ can be autowired. The final configuration looks like this:
778
784
You can now take advantage of the new features going forward.
779
785
780
786
.. _`FrameworkExtension for 3.3.0`: https://github.com/symfony/symfony/blob/7938fdeceb03cc1df277a249cf3da70f0b50eb98/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L247-L284
0 commit comments