@@ -35,10 +35,11 @@ Services: Naming and Configuration
35
35
Use autowiring to automate the configuration of application services.
36
36
37
37
:doc: `Service autowiring </service_container/autowiring >` is a feature provided
38
- by Symfony's Service Container to manage services with minimal configuration.
39
- It reads the type-hints on your constructor (or other methods) and automatically
40
- passes you the correct services. It can also add :doc: `service tags </service_container/tags >`
41
- to the services needed them, such as Twig extensions, event subscribers, etc.
38
+ by Symfony's Service Container to manage services with minimal configuration. It
39
+ reads the type-hints on your constructor (or other methods) and automatically
40
+ passes the correct services to each method. It can also add
41
+ :doc: `service tags </service_container/tags >` to the services needed them, such
42
+ as Twig extensions, event subscribers, etc.
42
43
43
44
The blog application needs a utility that can transform a post title (e.g.
44
45
"Hello World") into a slug (e.g. "hello-world") to include it as part of the
@@ -61,10 +62,6 @@ If you're using the :ref:`default services.yaml configuration <service-container
61
62
this class is auto-registered as a service whose ID is ``App\Utils\Slugger `` (or
62
63
simply ``Slugger::class `` if the class is already imported in your code).
63
64
64
- Traditionally, the naming convention for a service was a short, but unique
65
- snake case key - e.g. ``app.utils.slugger ``. But for most services, you should now
66
- use the class name.
67
-
68
65
.. best-practice ::
69
66
70
67
The id of your application's services should be equal to their class name,
0 commit comments