8000 Add note about configuration root node by mickadoo · Pull Request #10158 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content
8000

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

Closed
wants to merge 1 commit into from

Conversation

mickadoo
Copy link
Contributor
@mickadoo mickadoo commented Aug 8, 2018

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.

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',
));


Copy link
Member

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.

@xabbuh xabbuh added this to the 2.8 milestone Aug 10, 2018
8000
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``.

Copy link
Member

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? :)

Copy link
Member

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!

javiereguiluz added a commit that referenced this pull request Sep 24, 2018
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
@javiereguiluz
Copy link
Member

@mickadoo thanks for this contribution! We finally merged it in 2.8 branch and made some minor rewords as asked for by Ryan. Cheers!

@mickadoo
Copy link
Contributor Author

@weaverryan sorry I didn't have time to do the changes you suggest, but good to hear this was improved :-)

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.

5 participants
0