-
- Notifications
You must be signed in to change notification settings - Fork 5.3k
Re-introduced Validator component usage #6874
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
Conversation
Also I notice @wouterj said:
This is a non sense, a complete non sense to not document what FrameworkBundle hide to you. Components documentation is about ... "components". It's not about be "smart", it's about document a library correctly :/ Regarding the published Validator documentation, we have lost a lot of (useful) informations. |
I think you misunderstood me. Please also quote the first item:
What we mean is that if we document this in the guides: $this->get('validator')->validate(...); The component user is able to transform this into: // ... initializing the validator (which is still explained in the Validator component docs) $validator->validate(...); Currently, we most often duplicated the usage documentation in the guides and components, because we considered component users to be not smart enough to make this small transformation. We decided that they are smart enough and that we don't need this duplication. Still, component usage specific things (initializing and configuring the Validator instance) should be documented in the components docs. |
this is the point, and why I open this pull request: we have removed the information about how to create a simple Validator instance :) Maybe, the removing is unintentional but regarding the comments adressed to the Workflow component docs, I think my concerns are legitimate. I will always be in favor of removing duplicates, and to put the less efforts to the documentation teams, the red line (for me, very personal point of view) is to document:
Can you tell me what is the philosophy behind the new structure of Symfony documentation ? |
Wow, I just realized you're confused about the new structure. This may result in you thinking we removed all components usage:
The information you've added here can be found at http://symfony.com/doc/current/components/validator#retrieving-a-validator-instance Our philosophy is almost equal to the red line you just described. Except that we consider the "framework users" to be the least smart (before someone starts using the Validator or Security components standalone, they probably have more knowledge about PHP and libs then someone just started with Symfony). To compare:
Obviously, you're a pretty seasoned documentation user, so if you're already confused, beginners may be even more confused. Can you maybe give some insights in how we can avoid this confusion in the future? (i.e. why did you think the guides explain components set-up?) As this PR turns out not to be correct, I'm going to close it. I hope you understand this :) Closing doesn't mean discussion is ended, so please comment if you have time. (and remember, we can always reopen). Thanks for your feedback! |
@wouterj : There are two related things which are confusing IMO:
Mixing the references guides for usage & usage in the framework in the same place (the component doc) is kind of disturbing while navigating on the new documentation, and moreover the left menu keeps misleading the user. 😕 |
It's because the Components menu can't be expanded (so it'll expand the default section, which is the guides). But indeed, maybe we should make the components menu expandable as well.
The breadcrumb is indeed incorrect here. It's probably because we're driving Sphinx insane with the toctree usage in the docs (/cc @weaverryan). We probably have to revisit what we're doing with toctrees. For framework users, we want you to never visit the components docs. Most components are not yet updated with this philosophy, but this is at least our main goal. Would this solve your issues? Thanks as well for your feedback btw, it's highly appreciated! |
👍 Fixing those two issues would probably answer most of my concerns regarding the new structure. The philosophy behind is great :) Thanks. |
@ogizanagi thanks to have sum up my misunderstanding 👍 How about change So, for instance:
What do you think ?
I didn't think that. Exploring the hierachy, I have one more idea: how about reword the Guides entries ? For instance: Again, thank you for explanations and for the huge work: I may yell sometimes, but this is because I care and I love Symfony ! :) Mickaël |
Hi, I just saw use of Validator component have been removed, probably a mistake (the initial pull request have changed so many times ^^).
This re-introduce the creation of a Validator instance, useful when you use it without use the full edition framework :)
Also, regarding the initial (second in fact) pull request (https://github.com/symfony/symfony-docs/pull/5661/files) why Caching and Resources loading sections have been removed ?
Mickaël