@@ -46,7 +46,7 @@ Symfony Standard Edition:
4646 # if you need to do this, you can override this setting on individual services
4747 public : false
4848
49- # makes classes in src/AppBundle available to be used as services
49+ # makes classes in src/ available to be used as services
5050 # this creates a service per class whose id is the fully-qualified class name
5151 App\ :
5252 resource : ' ../../src/*'
@@ -136,7 +136,7 @@ thanks to the following config:
136136 services :
137137 # ...
138138
139- # makes classes in src/AppBundle available to be used as services
139+ # makes classes in src/ available to be used as services
140140 # this creates a service per class whose id is the fully-qualified class name
141141 App\ :
142142 resource : ' ../../src/*'
@@ -180,7 +180,7 @@ This means that every class in ``src/`` is *available* to be used as a
180180service. And thanks to the ``_defaults `` section at the top of the file, all of
181181these services are **autowired ** and **private ** (i.e. ``public: false ``).
182182
183- The service ids are equal to the class name (e.g. ``AppBundle \Service\InvoiceGenerator ``).
183+ The service ids are equal to the class name (e.g. ``App \Service\InvoiceGenerator ``).
184184And that's another change you'll notice in Symfony 3.3: we recommend that you use
185185the class name as your service id, unless you have :ref: `multiple services for the same class <services-explicitly-configure-wire-services >`.
186186
@@ -289,8 +289,8 @@ argument with ``InvoiceGenerator``::
289289
290290That's it! Both services are :ref: `automatically registered <service-33-changes-automatic-registration >`
291291and set to autowire. Without *any * configuration, the container knows to pass the
292- auto-registered ``AppBundle \Service\InvoiceGenerator `` as the first argument. As
293- you can see, the *type * of the class - ``AppBundle \Service\InvoiceGenerator `` - is
292+ auto-registered ``App \Service\InvoiceGenerator `` as the first argument. As
293+ you can see, the *type * of the class - ``App \Service\InvoiceGenerator `` - is
294294what's most important, not the id. You request an *instance * of a specific type and
295295the container automatically passes you the correct service.
296296
@@ -379,7 +379,7 @@ The third big change is that, in a new Symfony 3.3 project, your controllers are
379379 But, you might not even notice this. First, your controllers *can * still extend
380380the same base ``Controller `` class or a new :ref: `AbstractController <controller-abstract-versus-controller >`.
381381This means you have access to all of the same shortcuts as before. Additionally,
382- the ``@Route `` annotation and ``_controller `` syntax (e.g. ``AppBundle :Default:homepage ``)
382+ the ``@Route `` annotation and ``_controller `` syntax (e.g. ``App :Default:homepage ``)
383383used in routing will automatically use your controller as a service (as long as its
384384service id matches its class name, which it *does * in this case). See :doc: `/controller/service `
385385for more details. You can even create :ref: `invokable controllers <controller-service-invoke >`
@@ -631,7 +631,7 @@ Start by updating the service ids to class names:
631631
632632But, this change will break our app! The old service ids (e.g. ``app.github_notifier ``)
633633no longer exist. The simplest way to fix this is to find all your old service ids
634- and update them to the new class id: ``app.github_notifier `` to ``AppBundle \Service\GitHubNotifier ``.
634+ and update them to the new class id: ``app.github_notifier `` to ``App \Service\GitHubNotifier ``.
635635
636636In large projects, there's a better way: create legacy aliases that map the old id
637637to the new id. Create a new ``legacy_aliases.yml `` file:
@@ -730,7 +730,7 @@ You're now ready to automatically register all services in ``src/``
730730 # ...
731731
732732 That's it! Actually, you're already overriding and reconfiguring all the services
733- you're using (``AppBundle \Service\GitHubNotifier `` and ``AppBundle \Service\MarkdownTransformer ``).
733+ you're using (``App \Service\GitHubNotifier `` and ``App \Service\MarkdownTransformer ``).
734734But now, you won't need to manually register future services.
735735
736736Once again, there is one extra complication if you have multiple services of the
@@ -763,7 +763,7 @@ Step 5) Cleanup!
763763To make sure your application didn't break, you did some extra work. Now it's time
764764to clean things up! First, update your application to *not * use the old service id's (the
765765ones in ``legacy_aliases.yml ``). This means updating any service arguments (e.g.
766- ``@app.github_notifier `` to ``@AppBundle \Service\GitHubNotifier ``) and updating your
766+ ``@app.github_notifier `` to ``@App \Service\GitHubNotifier ``) and updating your
767767code to not fetch this service directly from the container. For example:
768768
769769.. code-block :: diff
0 commit comments