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

Need for introductory information about parameters #8996

Closed
voltel opened this issue Jan 7, 2018 · 1 comment
Closed

Need for introductory information about parameters #8996

voltel opened this issue Jan 7, 2018 · 1 comment
Labels
Config hasPR A Pull Request has already been submitted for this issue.
Milestone

Comments

@voltel
Copy link

voltel commented Jan 7, 2018

I couldn't figure out what parameters are concerned in "Accessing the Container Directly" section: from .env file, services.yaml file, or somewhere else. I raise this issue by @weaverryan recommendation.

As far as I understand, this is an introductory article, so some basic information about parameters would be of help. My suggestion is to include the services.yaml file with some parameters set, and then demonstrate how it's possible to reach them from within a controller.
It'd would be super cool, if it were explained with a real-life example, when this feature might be useful. I often find it confusing when there's a tool you have no clear idea where to use, or what it's for.

Related to this, in a section just above, "Fetching Services", at the end of a section, there's a Note block (with red explanation mark). As a person who learned English as a second language, I find it obscure and hard to understand.
So, my suggestion is to find another way to convey the idea (re-phrase it) and provide examples: one how it's supposed to work, and another – the "wrong" way. And again, it'd be cool to see the case where reaching some parameter ('kernel.debug' in this case) would be of benefit.

On a side note, I suggest styling code blocks with "wrong" approaches (with "this won't work" comment) somewhat differently (e.g. grayish background), since when browsing the pages for clues (when for example, I want to find a way to do something in a page I read some time ago), somehow I read wrong solutions in haste. It's not a big problem, but why not make browsing the topics visually simpler.

@weaverryan
Copy link
Member

Thanks for opening this! I agree with your conclusions :). So:

  1. I believe we’re actually going to remove the accessing the container directly section. So this will remove the reference to parameters

  2. instead of the warning below that you mentioned, yes, we should show an example. But I think we should show getParameter() being used (which only works with Controller in 4.0, but I think will Work for AbstractController in 4.1).

@javiereguiluz javiereguiluz changed the title Need for introductory infrormation about parameters Need for introductory information about parameters Feb 6, 2018
@javiereguiluz javiereguiluz added this to the 4.3 milestone Sep 17, 2019
@javiereguiluz javiereguiluz added the hasPR A Pull Request has already been submitted for this issue. label Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Config hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

3 participants