Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Updated blog docs for master (WIP) #117

Merged
merged 3 commits into from
May 22, 2013
Merged

Conversation

dantleech
Copy link
Member

Still lots to do here, notably no XML/Annotation config examples, and will need to update as blog bundle evolves.

blog_admin: ~ # Required
post_admin: ~ # Required
blog: ~ # Required
post: ~ # Required
Copy link
Member

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?

Copy link
Member Author

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...

Copy link
Member

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?

Copy link
Member

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

Copy link
Member

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.

Copy link
Member

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.

@dantleech
Copy link
Member Author

Updated, still missing some XML examples, and the XML is certainly wrong in one place, if not many.

),
));

.. code-block:: xml
Copy link
Member

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

@dantleech
Copy link
Member Author

Updated.

@dbu
Copy link
Member

dbu commented May 22, 2013

is this ready for merging? its in conflict with master and needs a rebase.

@dantleech
Copy link
Member Author

It probably should be merged as existing docs are inacurate, although its still missing some config examples. Have rebased.

dbu added a commit that referenced this pull request May 22, 2013
Updated blog docs for master (WIP)
@dbu dbu merged commit 8dc749b into symfony-cmf:master May 22, 2013
@dbu
Copy link
Member

dbu commented May 22, 2013

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants