Skip to content

[Components][DependencyInjection] fix wrong disable of factories #5132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions components/dependency_injection/factories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
Using a Factory to Create Services
==================================

.. versionadded:: 2.6
The new :method:`Symfony\\Component\\DependencyInjection\\Definition::setFactory`
method was introduced in Symfony 2.6. Refer to older versions for the
syntax for factories prior to 2.6.

Symfony's Service Container provides a powerful way of controlling the
creation of objects, allowing you to specify arguments passed to the constructor
as well as calling methods and setting parameters. Sometimes, however, this
Expand All @@ -17,6 +12,11 @@ For this situation, you can use a factory to create the object and tell the
service container to call a method on the factory rather than directly instantiating
the class.

.. versionadded:: 2.6
The new :method:`Symfony\\Component\\DependencyInjection\\Definition::setFactory`
method was introduced in Symfony 2.6. Refer to older versions for the
syntax for factories prior to 2.6.

Suppose you have a factory that configures and returns a new ``NewsletterManager``
object::

Expand Down