Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
Document the built in env var processors#9507
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
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.
@mcfedr thanks for working on this! It's a great feature and the docs you propose are very nice: concise and well explained!
A number of different types are supported: | ||
``env(string):FOO)`` |
javiereguiluzMar 28, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Typo: should beenv(string:FOO)
A number of different types are supported: | ||
``env(string):FOO)`` |
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'm not a big fan of usingfoo
andbar
in docs because I prefer to use more realistic examples. For example we could useENV_VAR_NAME
instead ofFOO
. But before making any change, let's wait for other opinions.
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 its a fair point, and more consistent with the style of the docs in general
``env(float:FOO)`` | ||
Casts ``FOO`` to an float | ||
``env(const:FOO)`` |
javiereguiluzMar 28, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 it'd be great to show a super simple example for each of these cases. Example:
``env(const:FOO)`` Finds the const value named in ``FOO`` (e.g. ``FOO=App\Config\UserConfig::FIREWALL_KEY``)
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.
Yes, I agree,
I was wondering if its useful to show even something like
parameters:env(FOO):Some\Constframework:something:'%env(const:FOO)%'
@mcfedr will you have some time before this months end to finish this PR? This is a top priority feature and we'd like to end the docs soon. It's OK if you don't have time because we can take it over for you. Cheers! |
mcfedr commentedMay 24, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I have added the extra examples that were missing originally. These mostly show examples of how it can be used. I kept to the sections using Anything you think is missing? |
…guiluz)This PR was merged into the master branch.Discussion----------Document the built in env var processorsThis is start at adding documentation for env var processors, e.g. `%env(int:FOO)%`I would welcome some feedback, if this a appropriate way to go about this, I think it needs some more examples to show how its used.It also would ideally add a description of how custom processors are added, although that might be a later request.starts tofix#8382,#9094Commits-------aed1607 Minor rewords and formatting fixese3fe5fe Example of customer env var processor67227a6 Add examples for parameter processorscd353c7 Add description of the built in envvar processors
…javiereguiluz)This PR was merged into the 3.4 branch.Discussion----------Document the built in env var processorsThis is start at adding documentation for env var processors, e.g. `%env(int:FOO)%`I would welcome some feedback, if this a appropriate way to go about this, I think it needs some more examples to show how its used.It also would ideally add a description of how custom processors are added, although that might be a later request.starts tofixsymfony#8382,symfony#9094Commits-------aed1607 Minor rewords and formatting fixese3fe5fe Example of customer env var processor67227a6 Add examples for parameter processorscd353c7 Add description of the built in envvar processors
* 3.4: minorsymfony#9507 Document the built in env var processors (mcfedr, javiereguiluz)
* 4.0: minorsymfony#9507 Document the built in env var processors (mcfedr, javiereguiluz)
* 4.1: minorsymfony#9507 Document the built in env var processors (mcfedr, javiereguiluz)
* 3.4: [#9507] remove csv processor, it was added in 4.1
* 4.0: [#9507] remove csv processor, it was added in 4.1
* 4.1: Fixed some wrong file paths Change code file location Fix typo for variable name Add link to configuration documentation Update upgrade_major.rst Add composer require symfony/webpack-encore-pack Reword the intro of a console article fix(Caution): Validator folder for YAML or XML format Fix the interface/abstract classes documentation Fix typo in Memcached adapter documentation [symfony#9507] add versionadded directive Revert "[symfony#9507] remove csv processor, it was added in 4.1" [symfony#9507] remove csv processor, it was added in 4.1
* 4.0: (24 commits) updating the guard session migration details for Symfony 3.4 changes Avoiding authentication on every request with Guard Minor typo in csrf.rst [Filesystem] Improved the code of an example Removed another usage of mt_rand() Transition from mt_rand to random_int Update setup.rst remove not existent label_attr options from buttons Fixed some code indentation Added the versionadded directive add missing XML and PHP code examples Expanded the explanation a bit Minor fixes Update licence hint for JMS serializer Revert "minor#9507 Document the built in env var processors (mcfedr, javiereguiluz)" Minor rewords and formatting fixes Example of customer env var processor Add examples for parameter processors Add description of the built in envvar processors Mention that "exclude" option now accepts arrays too ...
This reverts commit50bddbd.
Uh oh!
There was an error while loading.Please reload this page.
This is start at adding documentation for env var processors, e.g.
%env(int:FOO)%
I would welcome some feedback, if this a appropriate way to go about this, I think it needs some more examples to show how its used.
It also would ideally add a description of how custom processors are added, although that might be a later request.
starts tofix#8382,#9094