Skip to content

[DI] Add section about getter injection #7300

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

Closed
Closed
Changes from 1 commit
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
Prev Previous commit
Add a note about being an experimental feature
  • Loading branch information
javiereguiluz authored Feb 1, 2017
commit f5d13b64f9c8e8708a84283846acd9bc295649b7
9 changes: 7 additions & 2 deletions service_container/injection_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,13 @@ The disadvantages of setter injection are:
Getter Injection
----------------

.. versionadded:: 3.3
Getter Injection was introduced in Symfony 3.3.
.. versionadded:: 3.3
Getter Injection was introduced in Symfony 3.3.

.. caution::

This feature is marked as **experimental**. The next Symfony versions could
change its behavior or even remove this feature entirely.

Another possible injection point into a class is by overriding a getter method
to make it return the dependency::
Expand Down