Skip to content

[Dependency Injection] small changes #1860

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

Merged
merged 1 commit into from
Nov 10, 2012
Merged

[Dependency Injection] small changes #1860

merged 1 commit into from
Nov 10, 2012

Conversation

bamarni
Copy link
Contributor

@bamarni bamarni commented Oct 28, 2012

Hello,

This adds a missing semicolon. And as it is the doc for the standalone component, I'm wondering if %kernel.root_dir% shouldn't be changed to something more generic? It's the only places I could find this parameter in this doc.

@wouterj
Copy link
Member

wouterj commented Oct 28, 2012

I don't think we need to remove %app.root_dir%. The docs talks about using parameters inside a config file and it talks about what the root_dir is.

It maybe is a good idea to create a .. note:: block which talks short about this.

@bamarni
Copy link
Contributor Author

bamarni commented Oct 29, 2012

The parameter is still there I've just renamed it ;)

weaverryan added a commit that referenced this pull request Nov 10, 2012
[Dependency Injection] small changes
@weaverryan weaverryan merged commit d2445f9 into symfony:2.0 Nov 10, 2012
weaverryan added a commit that referenced this pull request Nov 10, 2012
I don't see any disadvantages for using a parameter here that *happens* to be used in the framework - the advantage is that it's meaningful for half the audience (and for component users, any parameter here will be a "generic")
@weaverryan
Copy link
Member

Hi Bilal!

Merged! I did change the parameter back to kernel.root_dir - I think that there's no harm if this "meaningless" parameter is shown to component users, but at least it is meaningful to component users. app may be slightly more descriptive than kernel, but I think both are clear. If component users think that there is some built-in significance to this component, then we should explain it (but I don't know if that's actually an issue).

Thanks for the fix and bringing up a good point (about the parameter) that I hadn't thought about before!

@bamarni
Copy link
Contributor Author

bamarni commented Nov 10, 2012

Hi Ryan,

Thanks for taking the time to explain your decision, I get your point about framework users but actually I think the opposite.

Personnaly I looked at this dependency injection doc for 2 reasons, the first one is of course to know how I can get this working on a regular PHP project not using the full stack framework, then it was also an opportunity to understand how the full-stack framework works, for example here if I had saw an %app.root_dir% parameter, it would make me think about %kernel.root_dir% as they're similar, and I would guess : "Oh, the kernel component probably uses this component too, and it defines a container builder with %kernel.root_dir% parameter instead of %app.root_dir%".

But this can not be the case anymore if components docs are not reduced to their minimal explanations.

Sorry for bothering you with this parameter as it's not a big deal but the point behind this is important imo.

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.

3 participants