Skip to content
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

Merged
merged 1 commit into from
May 13, 2014

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Apr 15, 2014

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.

@@ -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>`
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof indeed, that's why I added the comment in #3753

Copy link
Member

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.

Copy link
Member Author

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.

@weaverryan
Copy link
Member

Thanks Christian :)

@weaverryan weaverryan merged commit c845ce2 into symfony:2.3 May 13, 2014
weaverryan added a commit that referenced this pull request May 13, 2014
…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
@xabbuh xabbuh deleted the compile-container-note-2.3 branch May 14, 2014 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants