-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add documentation for using expressions as service factories #16516
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
Conversation
657396b
to
8b63ff7
Compare
Closing because the related code PR (symfony/symfony#45447) was closed without merging. |
The code PR was replaced by symfony/symfony#45512 which is still opened so this PR could still be relevant. |
Code PR has been merged, time to finish this one! |
@@ -125,3 +125,44 @@ via a ``container`` variable. Here's another example: | |||
|
|||
Expressions can be used in ``arguments``, ``properties``, as arguments with | |||
``configurator`` and as arguments to ``calls`` (method calls). | |||
|
|||
You can also use expressions as factories to create services based on an expression: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about shortening this to You can also use expressions as service factories:
We should also tell about the args/arg() var/function btw. |
I've update the PR to mention the |
@wouterj thanks for merging, the updated examples looks really good with the associated explanations. |
FTR, that was fixed in da91570. |
Doc PR for symfony/symfony#45512