Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
javiereguiluz merged 4 commits intosymfony:masterfrommcfedr:env-var-processors
May 27, 2018

Conversation

mcfedr
Copy link
Contributor

@mcfedrmcfedr commentedMar 27, 2018
edited
Loading

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

@mcfedrmcfedr changed the titleAdd description of the built in envvar processors[WIP] Add description of the built in envvar processorsMar 27, 2018
Copy link
Member

@javiereguiluzjaviereguiluz left a 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)``
Copy link
Member

@javiereguiluzjaviereguiluzMar 28, 2018
edited
Loading

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)``

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.

Copy link
ContributorAuthor

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)``
Copy link
Member

@javiereguiluzjaviereguiluzMar 28, 2018
edited
Loading

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``)

Copy link
ContributorAuthor

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)%'

javiereguiluz reacted with thumbs up emoji
@javiereguiluz
Copy link
Member

@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
Copy link
ContributorAuthor

mcfedr commentedMay 24, 2018
edited
Loading

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 usingenv(FOO) becauseENV_VAR_NAME seems confusing,

Anything you think is missing?

@javiereguiluzjaviereguiluz changed the title[WIP] Add description of the built in envvar processorsDocument the built in env var processorsMay 27, 2018
@javiereguiluz
Copy link
Member

@mcfedr thanks a lot for documenting this great feature. The only missing thing is the XML and PHP versions of all the YAML config examples. That's pretty boring, so let's merge this "as is" and I've created#9831 to look for volunteers who help us with that.

mcfedr reacted with thumbs up emoji

@javiereguiluzjaviereguiluz merged commitaed1607 intosymfony:masterMay 27, 2018
javiereguiluz added a commit that referenced this pull requestMay 27, 2018
…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 added a commit to javiereguiluz/symfony-docs that referenced this pull requestMay 27, 2018
…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
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestMay 27, 2018
…mcfedr, javiereguiluz)"This reverts commitc98569d, reversingchanges made to2a76e88.
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestMay 27, 2018
* 3.4:  minorsymfony#9507 Document the built in env var processors (mcfedr, javiereguiluz)
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestMay 27, 2018
* 4.0:  minorsymfony#9507 Document the built in env var processors (mcfedr, javiereguiluz)
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestMay 27, 2018
* 4.1:  minorsymfony#9507 Document the built in env var processors (mcfedr, javiereguiluz)
xabbuh added a commit that referenced this pull requestJun 2, 2018
xabbuh added a commit that referenced this pull requestJun 2, 2018
* 3.4:  [#9507] remove csv processor, it was added in 4.1
xabbuh added a commit that referenced this pull requestJun 2, 2018
* 4.0:  [#9507] remove csv processor, it was added in 4.1
xabbuh added a commit that referenced this pull requestJun 2, 2018
xabbuh added a commit that referenced this pull requestJun 2, 2018
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestJun 6, 2018
* 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
weaverryan added a commit that referenced this pull requestJun 11, 2018
* 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  ...
Guikingone pushed a commit to Guikingone/symfony-docs that referenced this pull requestFeb 12, 2019
…mcfedr, javiereguiluz)"This reverts commitc98569d, reversingchanges made to2a76e88.
Guikingone pushed a commit to Guikingone/symfony-docs that referenced this pull requestFeb 12, 2019
Guikingone pushed a commit to Guikingone/symfony-docs that referenced this pull requestFeb 12, 2019
Guikingone pushed a commit to Guikingone/symfony-docs that referenced this pull requestFeb 12, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

Assignees
No one assigned
Projects
None yet
Milestone
3.4
Development

Successfully merging this pull request may close these issues.

Update %env()% documentation
4 participants
@mcfedr@javiereguiluz@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp