Skip to content

Commit cfcc876

Browse files
committed
minor #7959 Added a caution note about services that must maintain the "class" parameter (javiereguiluz, HeahDude)
This PR was merged into the 3.3 branch. Discussion ---------- Added a caution note about services that must maintain the "class" parameter This fixes #7935. Commits ------- 4219a5e minor fix b857caf Added a caution note about services that must maintain the "class" parameter
2 parents e68f0e8 + 4219a5e commit cfcc876

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

service_container/3.3-di-changes.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,14 @@ Start by updating the service ids to class names:
572572
app.api_client_sl_connect:
573573
# ...
574574
575+
.. caution::
576+
577+
Services associated with global PHP classes (i.e. not using PHP namespaces)
578+
must maintain the ``class`` parameter. For example, when using the old Twig
579+
classes (e.g. ``Twig_Extensions_Extension_Intl`` instead of ``Twig\Extensions\IntlExtension``),
580+
  you can't redefine the service as ``Twig_Extensions_Extension_Intl: ~`` and
581+
you must keep the original ``class`` parameter.
582+
575583
But, this change will break our app! The old service ids (e.g. ``app.github_notifier``)
576584
no longer exist. The simplest way to fix this is to find all your old service ids
577585
and update them to the new class id: ``app.github_notifier`` to ``AppBundle\Service\GitHubNotifier``.

0 commit comments

Comments
 (0)