Skip to content

Commit a4796b8

Browse files
committed
minor #9701 Fix factory-service new syntax (lex111)
This PR was submitted for the 4.0 branch but it was merged into the 2.7 branch instead (closes #9701). Discussion ---------- Fix factory-service new syntax As I understand, this applies to all versions, not just 4.0. At least, the factory does not work for me, if I use only one `:` https://github.com/symfony/dependency-injection/blob/e237279af4735c1566a62853c65de12b3266f0ef/Definition.php#L106-L108 Commits ------- 475cdc7 Fix factory-service new syntax
2 parents 3c88886 + 475cdc7 commit a4796b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

service_container/factories.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Configuration of the service container then looks like this:
106106
app.newsletter_manager:
107107
class: AppBundle\Email\NewsletterManager
108108
# call a method on the specified factory service
109-
factory: 'app.newsletter_manager_factory:createNewsletterManager'
109+
factory: 'app.newsletter_manager_factory::createNewsletterManager'
110110
111111
.. code-block:: xml
112112
@@ -160,7 +160,7 @@ Configuration of the service container then looks like this:
160160
161161
app.newsletter_manager:
162162
# new syntax
163-
factory: 'app.newsletter_manager_factory:createNewsletterManager'
163+
factory: 'app.newsletter_manager_factory::createNewsletterManager'
164164
# old syntax
165165
factory: ['@app.newsletter_manager_factory', createNewsletterManager]
166166

0 commit comments

Comments
 (0)