Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit08041e8

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 preciselyHere, 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 ofconfiguration 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 containsthe bug (seehttps://symfony.com/roadmap for the list of maintained branches).If your pull request documents a NEW FEATURE, use the same Symfony branch wherethe feature was introduced (and `master` for features of unreleased versions).-->Commits-------1a4f8ff Describe things more precisely
2 parents99a8323 +1a4f8ff commit08041e8

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)

[8]ページ先頭

©2009-2025 Movatter.jp