8000 minor #9214 Mentioned the short syntax for XML config of service fact… · symfony/symfony-docs@4485c9c · GitHub
[go: up one dir, main page]

Skip to content

Commit 4485c9c

Browse files
committed
minor #9214 Mentioned the short syntax for XML config of service factories (javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- Mentioned the short syntax for XML config of service factories This fixes #7442. Commits ------- eafe44a Mentioned the short syntax for XML config of service factories
2 parents bcb4076 + eafe44a commit 4485c9c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

service_container/factories.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ configure the service container to use the
5757
<service id="AppBundle\Email\NewsletterManager">
5858
<!-- call the static method -->
5959
<factory class="AppBundle\Email\NewsletterManagerStaticFactory" method="createNewsletterManager" />
60+
61+
<!-- starting from Symfony 3.3, if the factory class is the same as the service
62+
class, you can omit the 'class' attribute and define just the 'method' attribute:
63+
64+
<factory method="createNewsletterManager" />
65+
-->
6066
</service>
6167
</services>
6268
</container>

0 commit comments

Comments
 (0)
0