Skip to content

Commit ca3eb9b

Browse files
committed
Update factories.rst
1 parent 25d2f54 commit ca3eb9b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

components/dependency_injection/factories.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
Using a Factory to Create Services
55
==================================
66

7-
.. versionadded:: 2.6
8-
The new :method:`Symfony\\Component\\DependencyInjection\\Definition::setFactory`
9-
method was introduced in Symfony 2.6. Refer to older versions for the
10-
syntax for factories prior to 2.6.
11-
127
Symfony's Service Container provides a powerful way of controlling the
138
creation of objects, allowing you to specify arguments passed to the constructor
149
as well as calling methods and setting parameters. Sometimes, however, this
@@ -17,6 +12,11 @@ For this situation, you can use a factory to create the object and tell the
1712
service container to call a method on the factory rather than directly instantiating
1813
the class.
1914

15+
.. versionadded:: 2.6
16+
The new :method:`Symfony\\Component\\DependencyInjection\\Definition::setFactory`
17+
method was introduced in Symfony 2.6. Refer to older versions for the
18+
syntax for factories prior to 2.6.
19+
2020
Suppose you have a factory that configures and returns a new ``NewsletterManager``
2121
object::
2222

0 commit comments

Comments
 (0)