Skip to content

Commit 3ab6403

Browse files
authored
Update service_container/factories.rst
1 parent d7630f3 commit 3ab6403

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

service_container/factories.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ called to create its object. In this case we don't need a dedicated factory clas
138138
App\Email\NewsletterManager:
139139
# the first argument is the class and the second argument is the static method
140140
# note that we omit the '@' prefix when using the class name as the first argument!
141+
# you can also remove the class name entirely and use 'null' instead
141142
factory: ['App\Email\NewsletterManager', 'create']
142143
arguments:
143144
$sender: 'fabien@symfony.com'

0 commit comments

Comments
 (0)