8000 minor #10845 Describe things more precisely (greg0ire) · symfony/symfony-docs@08041e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 08041e8

Browse files
committed
minor #10845 Describe things more precisely (greg0ire)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #10845). Discussion ---------- Describe things more precisely Here, namespace is referring to that kind of thing: App\Namespace\: resource: '../../src/App/Namespace/*' And it looks as if there is no word yet to name that kind of configuration block. I propose to use namespace resource declaration, but please do suggest better alternatives, (glob resouce declaration?). <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 1a4f8ff Describe things more precisely
2 parents 99a8323 + 1a4f8ff commit 08041e8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

service_container/autowiring.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,13 @@ Thanks to the ``AppBundle\Util\TransformerInterface`` alias, the autowiring subs
343343
knows that the ``AppBundle\Util\Rot13Transformer`` service should be injected when
344344
dealing with the ``TransformerInterface``.
345345

346+
.. tip::
347+
348+
When using a `service definition prototype`_, if only one service is
349+
discovered that implements an interface, and that interface is also
350+
discovered at the same time, configuring the alias is not mandatory
351+
and Symfony will automatically create one.
352+
346353
Dealing with Multiple Implementations of the Same Type
347354
------------------------------------------------------
348355

@@ -503,3 +510,4 @@ Public bundles should explicitly configure their services and not rely on autowi
503510

504511
.. _Rapid Application Development: https://en.wikipedia.org/wiki/Rapid_application_development
505512
.. _ROT13: https://en.wikipedia.org/wiki/ROT13
513+
.. _service definition prototype: https://symfony.com/blog/new-in-symfony-3-3-psr-4-based-service-discovery

0 commit comments

Comments
 (0)
0