@@ -591,11 +591,11 @@ no longer exist. The simplest way to fix this is to find all your old service id
591
591
and update them to the new class id: ``app.github_notifier `` to ``App\Service\GitHubNotifier ``.
592
592
593
593
In large projects, there's a better way: create legacy aliases that map the old id
594
- to the new id. Create a new ``legacy_aliases.yml `` file:
594
+ to the new id. Create a new ``legacy_aliases.yaml `` file:
595
595
596
596
.. code-block :: yaml
597
597
598
- # app/ config/legacy_aliases.yml
598
+ # config/legacy_aliases.yaml
599
599
services :
600
600
_defaults :
601
601
public : true
@@ -611,7 +611,7 @@ Then import this at the top of ``services.yaml``:
611
611
612
612
# config/services.yaml
613
613
+ imports:
614
- + - { resource: legacy_aliases.yml }
614
+ + - { resource: legacy_aliases.yaml }
615
615
616
616
# ...
617
617
@@ -635,7 +635,7 @@ Now you're ready to default all services to be private:
635
635
+ public: false
636
636
637
637
Thanks to this, any services created in this file cannot be fetched directly from
638
- the container. But, since the old service id's are aliases in a separate file (``legacy_aliases.yml ``),
638
+ the container. But, since the old service id's are aliases in a separate file (``legacy_aliases.yaml ``),
639
639
these *are * still public. This makes sure the app keeps working.
640
640
641
641
If you did *not * change the id of some of your services (because there are multiple
@@ -723,7 +723,7 @@ Step 5) Cleanup!
723
723
724
724
To make sure your application didn't break, you did some extra work. Now it's time
725
725
to clean things up! First, update your application to *not * use the old service id's (the
726
- ones in ``legacy_aliases.yml ``). This means updating any service arguments (e.g.
726
+ ones in ``legacy_aliases.yaml ``). This means updating any service arguments (e.g.
727
727
``@app.github_notifier `` to ``@App\Service\GitHubNotifier ``) and updating your
728
728
code to not fetch this service directly from the container. For example:
729
729
@@ -739,7 +739,7 @@ code to not fetch this service directly from the container. For example:
739
739
// ...
740
740
}
741
741
742
- As soon as you do this, you can delete ``legacy_aliases.yml `` and remove its import.
742
+ As soon as you do this, you can delete ``legacy_aliases.yaml `` and remove its import.
743
743
You should do the same thing for any services that you made public, like
744
744
``app.api_client_github `` and ``app.api_client_sl_connect ``. Once you're not fetching
745
745
these directly from the container, you can remove the ``public: true `` flag:
0 commit comments