Skip to content

Commit 127beed

Browse files
committed
minor symfony#3770 Update factories.rst (AlaaAttya)
This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes symfony#3770). Discussion ---------- Update factories.rst your factory method should be static to work! Commits ------- 97ed5ce Update factories.rst aefc36c Update factories.rst a9cfdb2 Update factories.rst
2 parents 14b9f14 + c818065 commit 127beed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/dependency_injection/factories.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ class:
7979
8080
When you specify the class to use for the factory (via ``factory_class``)
8181
the method will be called statically. If the factory itself should be instantiated
82-
and the resulting object's method called (as in this example), configure the
83-
factory itself as a service:
82+
and the resulting object's method called, configure the factory itself as a service.
83+
In this case, the method (e.g. get) should be changed to be non-static:
8484

8585
.. configuration-block::
8686

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy