Skip to content

Added documentation for the Config Component #1550

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 3 commits into from
Closed

Added documentation for the Config Component #1550

wants to merge 3 commits into from

Conversation

matthiasnoback
Copy link
Contributor

I took the time to reshape my blog posts about the Config Component (http://php-and-symfony.matthiasnoback.nl/2012/05/symfony2-config-component-using-filelocator-loaders-and-loaderresolver/ and http://php-and-symfony.matthiasnoback.nl/2012/05/symfony2-config-component-config-definition-and-processing/). I have added some chapters about it to the Components documentation.

There should probably be links to these chapters from several other parts of the Symfony Documentation (like http://symfony.com/doc/current/cookbook/bundles/extension.html).

But first: any feedback is welcome!

Note: something is wrong with my "fork" and I don't know how to fix it... If anyone could help me: thanks!

@matthiasnoback
Copy link
Contributor Author

By the way, this closes issue #962

@wouterj
Copy link
Member

wouterj commented Jul 10, 2012

Note: something is wrong with my "fork" and I don't know how to fix it... If anyone could help me: thanks!

What is wrong? I will help you, but I don't see any problems?


use Symfony\Component\Config\ConfigCache;

// $yamlUserFiles is filled before with an array of 'users.yml' file paths
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should change this line to something like:

// fill this with an array of 'users.yml' file paths
$yamlUserFiles = ...;

@matthiasnoback
Copy link
Contributor Author

@stof @wouterj Thanks for all your feedback! I will get to it tomorrow.

@wouterj
Copy link
Member

wouterj commented Jul 10, 2012

And one other thing, I think this needs to be merged into the 2.0 branch, not the master branch.

@stof
Copy link
Member

stof commented Jul 10, 2012

@wouterj as it is only about adding new files (except for the map file), patching it in the 2.0 branch should be possible. So keeping it in the current PR allows to keep the feedback in one place

==========================

When all configuration resources are loaded, you may want to process the configuration values and
combine them all in one file. This file acts like a cache. It’s contents don’t have to be
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's -> its

weaverryan added a commit that referenced this pull request Jul 14, 2012
@weaverryan
Copy link
Member

Hey Matthias!

Wow, this is a really great bootstrap on a component that we've needed to get started for a long time. Thank you for that! I did tweak a few things, but it was minor - my diffs look much much bigger than they actually are - I shorted most lines a bit, which account for those changes. There was very little of any english/language changes - so thanks to you and our other reviewers for that :).

I do think that the "Definition" section is the hardest for people to understand, and I think we can still do an even better job - probably with even more examples and showing the tree, input config, and resulting output config for that tree.

I patched your commits into the 2.0 branch at:

Thanks again Matthias!

@weaverryan weaverryan closed this Jul 14, 2012
@stof
Copy link
Member

stof commented Jul 15, 2012

I finally stopped being lazy about it and put my slides from the sfPot (May 9th) online. They contain a bunch of such examples, and you can reuse them for the doc: http://friendsofsymfony.github.com/slides/config_definition.html#1

@matthiasnoback
Copy link
Contributor Author

@weaverryan Thanks! What would be the maximum line length? I can stick to it next time ;)
Adding some examples would be really nice, maybe @stof can do it, since it might take some time before I get to it.

@stof
Copy link
Member

stof commented Jul 17, 2012

@matthiasnoback wrapping after the first word crossing 72 chars, meaning the lines are generally between 73 and 80 chars (depending of the length of this word)

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.

4 participants