Skip to content

[Cookbook][Configuration] add configuration cookbook handlig parameters in Configurator class #3420

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

cordoval
Copy link
Contributor

@cordoval cordoval commented Jan 4, 2014

Q A
Doc fix? yes
New docs? no
Applies to 2.3+
Fixed tickets #3219
License CC-ASA 3.0 Unported

Sent using Gush

@wouterj
Copy link
Member

wouterj commented Jan 4, 2014

Wow, you are also heavily contributing to the docs? 😉 FYI, the License row is not needed in the doc PR format.

@@ -89,6 +89,8 @@ The second method has several specific advantages:
supported configuration settings for which backward compatibility will
be maintained.

For other usages of the parameter ``%`` syntax see :doc:`Configuration </cookbook/configuration>`.
Copy link
Member

Choose a reason for hiding this comment

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

put the hole :doc: role on a new line

Copy link
Member

Choose a reason for hiding this comment

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

and this should be placed in a .. seealso:: directive

@wouterj
Copy link
Member

wouterj commented Jan 5, 2014

@cordoval, what do you mean? You can use it at any time to resolve the string into a parameter value, if the syntax is correct.

``%kernel.debug%`` debug mode parameter to make your bundle adapt its
configuration depending on this. For this case you cannot use
the syntax directly and expect this to work. The configuration handling
will just tread this ``%kernel.debug%`` as a string. Consider
Copy link

Choose a reason for hiding this comment

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

tread -> treat?

@cordoval
Copy link
Contributor Author

cordoval commented Jan 6, 2014

@wouterj about the resolveValue I am still not sure, AsseticBundle and TwigBundle don't use it. No?

@@ -6,6 +6,7 @@ Configuration

environments
override_dir_structure
using_configuration_parameters
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 we're missing the addition in cookbook/map.rst.inc

@weaverryan
Copy link
Member

Hey Luis!

I think you did some nice writing on this entry, thanks for starting it! But, I want to make it much smaller. Imo, this entry is too large for the small question that it's answering. After reading it, I don't think we should talk about how parameters are used or what they are at all. The point of this article, and what I think we should rename it to, is "How to use Parameters (e.g. kernel.debug) within a DependencyInjection Extension Class". Then, I think we should show them the answer directly.

This comment comes after my line-comments above - I don't think we need to worry about those anymore because I think these sections should be removed.

What do you think?

@cordoval
Copy link
Contributor Author

@weaverryan agree, working on this right now

@cordoval
Copy link
Contributor Author

@weaverryan 🚢 🇮🇹 boss

.. seealso::

For other usages of the parameter ``%`` syntax see
:doc:`Using Parameters Within A Dependency Injection Class </cookbook/using_parameters_in_dic>`.
Copy link
Member

Choose a reason for hiding this comment

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

You don't have to use the title here:

:doc:`</cookbook/using_parameters_in_dic>`.

Copy link
Member

Choose a reason for hiding this comment

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

Additionally, the document is located at ``/cookbook/configuration/using_parameters_in_dic`.

.. seealso::

For other usages of the parameter ``%`` syntax see
:doc:`</cookbook/configuration/using_parameters_in_dic>`.
Copy link
Member

Choose a reason for hiding this comment

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

this is no longer true, is it?

@cordoval
Copy link
Contributor Author

bump 👶

@cordoval
Copy link
Contributor Author

bump @weaverryan @wouterj

@wouterj
Copy link
Member

wouterj commented Jan 30, 2014

there is not much to bump me for.. I've reviewed it. Now, you only need to be patient. Believe me, you're PR isn't lost, ryan just didn't had the time to review it (with such big changes, it'll take longer to review and thus longer to merge)

@weaverryan
Copy link
Member

Yep, I'll review this shortly - I need to merge in some smaller PR's first :)

@weaverryan
Copy link
Member

I like it! A small, but complex topic with a nice explanation. Great work!

weaverryan added a commit that referenced this pull request Mar 18, 2014
…ndlig parameters in Configurator class (cordoval)

This PR was merged into the 2.3 branch.

Discussion
----------

[Cookbook][Configuration] add configuration cookbook handlig parameters in Configurator class

| Q             | A                   |
| ---           | ---                 |
| Doc fix?      | yes                 |
| New docs?     | no                  |
| Applies to    | 2.3+                |
| Fixed tickets | #3219               |
| License       | CC-ASA 3.0 Unported |

 Sent using [Gush](https://github.com/cordoval/gush)

Commits
-------

9710bb5 final touches
ad27a83 address comments by xabbuh
a6bda5e address weaverryan comments
28c144a plug xml and php version of the configuration
c07c655 fix see also block
ec13feb plug changes according to comments
243c0d1 create configuration cookbook with ways of handling paramters in Configurator class
@weaverryan weaverryan merged commit 9710bb5 into symfony:2.3 Mar 18, 2014
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.

6 participants