Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Explain sample configuration parameter usage#5621
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The "Processing the ``$configs`` Array" section explains how to define parameters within the Configuration class and process them in the Extension. In my opinion, it doesn't take the example to a logical conclusion. People reading this file want to learn how to create configuration within a Bundle. It would be helpful to explain how the configuration can be used. Since the example uses parameters, I propose showing how the parameters can be loaded into the container. With these code changes, the `twitter.client_id` and `twitter.client_secret` are now available through use throughout the application.
xabbuh commentedAug 17, 2015
Even though I think that you have a point in saying that we fail to explain how to work with a processed configuration, I don't agree with the proposed solution. The reason is that exposing parameters makes them globally available in the whole application. This makes it harder to make future changes as you cannot remove parameters to maintain backwards compatibility. Instead, I suggest to show how to conditionally load services based on actual configuration values or to dynamically inject constructor/method arguments into service definitions. |
This PR was merged into the 2.7 branch.Discussion----------Explain sample configuration parameter usageThe "Processing the `$configs` Array" section explains how to define parameters within the Configuration class and process them in the Extension. In my opinion, it doesn't take the example to a logical conclusion. People reading this file want to learn how to create configuration within a Bundle. It would be helpful to explain how the configuration can be used. Since the example uses parameters, I propose showing how the parameters can be loaded into the container. With these code changes, the `twitter.client_id` and `twitter.client_secret` are now available through use throughout the application.Commits-------ceacc7c Explain sample configuration parameter usage
weaverryan commentedApr 15, 2017
* 2.7: (31 commits) Fixed the RST syntax Improve example context [#5621] Enhancing example of using bundle config [#7601] minor tweak Update expiration.rst Update expiration.rst Update expiration.rst Update expiration.rst Minor reword and fixed the line length Improve specification explanation [#7664] minor wording tweak Rewords and minor fixes Add an explanation about «constraints» validation [#7645] enumerate ordered list items implicitly Adding a new article about "Creating a Bug Reproducer" Fixed a syntax issue Use backticks#7311 choice_value callback argument can be null Fixed broken links for nginx & FastCgiExternalServer Update dialoghelper.rst ...
* 2.8: (46 commits) [#7507] fix component name [#7490] minor typo fix Added a note about redirections to absolute URLs in tests Added the changes suggested by reviewers [#7620] use generate() in PHP templates before 2.8 Fixed the RST syntax Improve example context [#5621] Enhancing example of using bundle config [#7601] minor tweak Update expiration.rst Update expiration.rst Update expiration.rst Update expiration.rst Minor reword and fixed the line length Improve specification explanation [#7664] minor wording tweak Rewords and minor fixes Add an explanation about «constraints» validation [#7645] enumerate ordered list items implicitly Adding a new article about "Creating a Bug Reproducer" ...
The "Processing the
$configsArray" section explains how to define parameters within the Configuration class and process them in the Extension. In my opinion, it doesn't take the example to a logical conclusion. People reading this file want to learn how to create configuration within a Bundle. It would be helpful to explain how the configuration can be used. Since the example uses parameters, I propose showing how the parameters can be loaded into the container. With these code changes, thetwitter.client_idandtwitter.client_secretare now available through use throughout the application.