-
Notifications
You must be signed in to change notification settings - Fork 156
Conversation
blog_admin: ~ # Required | ||
post_admin: ~ # Required | ||
blog: ~ # Required | ||
post: ~ # Required |
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.
ok that answers my question on the other PR. why force that? can't we set default values rather?
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.
The class key isn't forced, but if you do specify it, you must specify the children. Sonata does similar minus default values. I'm sure its possible to have this work as expected, i.e specify what you want changed, but the DI config API drives me crazy...
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.
ah ok. yeah would be cool if people could just specify those classes they want. maybe @lsmith77 has a hint where to look for an example of this?
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.
not sure exactly what the question is here? the relevant code is at https://github.com/symfony-cmf/BlogBundle/blob/master/DependencyInjection/Configuration.php#L47
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.
dan wrote that code. the question is how to configure the Configuration thingy to have to specify just those parameters here that we actually want to change, and still get all of the values in the config options, even those not set in the config file.
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.
i think the only way to do it is by appending a config array before processing. can't find an example. but you would there by effectively move the defaults into an array in the DI extension. because of this you know that there will be values set, so you can leave the required off but set an non empty in the Configuration class.
Updated, still missing some XML examples, and the XML is certainly wrong in one place, if not many. |
), | ||
)); | ||
|
||
.. code-block:: xml |
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.
use the order yaml, xml, php
Updated. |
is this ready for merging? its in conflict with master and needs a rebase. |
It probably should be merged as existing docs are inacurate, although its still missing some config examples. Have rebased. |
Updated blog docs for master (WIP)
i just merged. its not good to delay the config examples, but if we don't have the time to do it, not merging is worse imo. |
Still lots to do here, notably no XML/Annotation config examples, and will need to update as blog bundle evolves.