-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[Components][DependencyInjection] add note about a use case that requires to compile the container #3804
Conversation
@@ -9,6 +9,12 @@ include checking for any potential issues such as circular references and | |||
making the container more efficient by resolving parameters and removing | |||
unused services. | |||
|
|||
.. note:: | |||
|
|||
Using :doc:`parent services </components/dependency_injection/parentservices>` |
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.
this should be placed in the docs for parent services instead of here imo
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.
Well, we already have a note in the article about parent services. But, as you can see in the issue in the symfony repo, people can be confused with the "can be compiled for various reasons" sentence since it is really unspecific. So I thought it would be nice to give an example for a real use case where you have to compile the container.
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.
another case where it is required in 2.5 is when using the decorates
feature. In general, features are not 100% guaranteed to work if you skip the compilation
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.
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 see both sides. How about we change this to be just another sentence at the end of the opening paragraph?
Also, certain features - like using [link]parent services[/link] - require the container to be compiled.
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 like this idea. Updated the pull request.
…ires to compile the container
Thanks Christian :) |
…se that requires to compile the container (xabbuh) This PR was merged into the 2.3 branch. Discussion ---------- [Components][DependencyInjection] add note about a use case that requires to compile the container | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | As @movetodevnull pointed out in symfony/symfony#10045, the compilation chapter of the DependencyInjection component doesn't give any concrete use case of when it is absolutely needed to compile the container. We should decide whether or not it makes sense to extend this note, once #3753 is getting merged. Commits ------- c845ce2 [Components][DependencyInjection] add note about a use case that requires to compile the container
As @movetodevnull pointed out in symfony/symfony#10045, the compilation chapter of the DependencyInjection component doesn't give any concrete use case of when it is absolutely needed to compile the container.
We should decide whether or not it makes sense to extend this note, once #3753 is getting merged.