-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add note about configuration root node #10158
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
Something I ran into myself, as well as a good few other people based on [this SO answer](https://stackoverflow.com/a/35505189/1196369)
@@ -92,6 +92,13 @@ bundle configuration would look like: | |||
'client_secret' => 'your_secret', | |||
)); | |||
|
|||
|
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.
One blank line here is enough. But we can change that while merging.
The root node of your bundle configuration must match the name of your | ||
bundle without the 'Bundle' suffix in camel case. For example | ||
``AcmeSocialBundle`` becomes ``acme_social``. | ||
|
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.
Indeed. The current description is not good enough! I propose we make this even more obvious. Instead of a note down here, let's move this into the text below the Using the Bundle Extension
headline. Something like this:
Imagine you are creating a new bundle -
AcmeSocialBundle
- which provides...
integration with Twitter, etc. To make your bundle easy to use, you want to
allow users to configure it with some configuration that looks like this:
... the code block
The root key - acme_social
is automatically determined from your bundle name.
But, there's another problem: we never actually show the extension class being created! This lives in /bundles/extension
. We should really move that content into this file.
This just got a bit bigger @mickadoo. Are you up for trying it? :)
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.
Ryan, I've made most of the changes you asked here while merging ... but I didn't include the extension example because it's too complex. Thanks!
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #10158). Discussion ---------- Add note about configuration root node Adds a note on an issue I ran into myself, as well as a good few other people based on [this SO answer](https://stackoverflow.com/a/35505189/1196369) This is my first contribution to symfony-docs, I copied another `tip::` block so hopefully the result should be the same, but I haven't tested this locally. Commits ------- 33e8fd2 Add note about configuration root node
@mickadoo thanks for this contribution! We finally merged it in 2.8 branch and made some minor rewords as asked for by Ryan. Cheers! |
@weaverryan sorry I didn't have time to do the changes you suggest, but good to hear this was improved :-) |
Adds a note on an issue I ran into myself, as well as a good few other people based on this SO answer
This is my first contribution to symfony-docs, I copied another
tip::
block so hopefully the result should be the same, but I haven't tested this locally.