Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Added a note about inlined private services#3727
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
book/service_container.rst Outdated
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.
I would emphasis "one":*one*
wouterj commentedMar 28, 2014
👍 (btw, if it applies to all versions, it should be merged into the 2.3 branch) |
service is used as argument for a single service
javiereguiluz commentedMar 28, 2014
@wouterj added the emphasis on theone word. Indeed this should be applied to any 2.3+ branch. Sorry for having committed to the wrong branch again! |
book/service_container.rst Outdated
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.
Because there's no header immediately after the target, we have to include a label here, something like:
:ref:`Inline Private Services <inlined-private-services>` for more details.weaverryan commentedApr 2, 2014
Thanks Javier! |
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#3727).Discussion----------Added a note about inlined private services| Q | A| ------------- | ---| Doc fix? | no| New docs? | yes| Applies to | 2.3+| Fixed tickets | -When you define private services that are used just as arguments for another service, Symfon2 doesn't define them as services, but inlines them in the other service definition. This slightly improves the performance of the container, but it's confusing for Symfony beginners because the private services aren't displayed by the `container:debug` command even when using the `--show-private` option:```$ php app/console container:debug --show-private```Commits-------15a7be0 [book] [service_container] added the title of a cross reference835b52f Emphasized the fact that this only applies when the private service is used as argument for a single service04cb9d4 Added a note about inlined private services
When you define private services that are used just as arguments for another service, Symfon2 doesn't define them as services, but inlines them in the other service definition. This slightly improves the performance of the container, but it's confusing for Symfony beginners because the private services aren't displayed by the
container:debugcommand even when using the--show-privateoption: