File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -576,6 +576,16 @@ Start by updating the service ids to class names:
576
576
you can't redefine the service as ``Twig_Extensions_Extension_Intl: ~ `` and
577
577
you must keep the original ``class `` parameter.
578
578
579
+ .. caution ::
580
+
581
+ If a service is processed by a :doc: `compiler pass </service_container/compiler_passes >`,
582
+ you could face a "You have requested a non-existent service" error.
583
+ To get rid of this, be sure that the Compiler Pass is using ``findDefinition() ``
584
+ instead of ``getDefinition() ``. The latter won't take aliases into
585
+ account when looking up for services.
586
+ Furthermore it is always recommendend to check for definition existance
587
+ using ``has() `` function.
588
+
579
589
But, this change will break our app! The old service ids (e.g. ``app.github_notifier ``)
580
590
no longer exist. The simplest way to fix this is to find all your old service ids
581
591
and update them to the new class id: ``app.github_notifier `` to ``AppBundle\Service\GitHubNotifier ``.
You can’t perform that action at this time.
0 commit comments