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

[Config] Allow using environment variables inEnumNode#45624

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
fabpot merged 1 commit intosymfony:6.1fromecourtial:add-placeholder-support-to-enumnodes
Mar 9, 2022
Merged

[Config] Allow using environment variables inEnumNode#45624

fabpot merged 1 commit intosymfony:6.1fromecourtial:add-placeholder-support-to-enumnodes
Mar 9, 2022

Conversation

@ecourtial
Copy link

QA
Branch?6.1
Bug fix?no
New feature?yes
Deprecations?no
Tickets
LicenseMIT
Doc PR

In theEnumNode of theConfig component, we see that it does not allow the use of a placeholder:

This is strange, because we could have some use cases where we would like to be able to define the value with a env variable. A good example is the samesite policy for the session cookie :https://symfony.com/blog/new-in-symfony-4-2-samesite-cookie-configuration.

Note: I have not submitted any documentation update so far, I am not even sure it is a "new" feature.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.1 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@ro0NL
Copy link
Contributor

maybe reasonable 👍

(the reason behind current behavior is we cant assume env values always fit the enum)

@ecourtial
Copy link
Author

What are the differences between thehigh-deps and thelow_deps jobs? The first one is failing like if one of the changes is not considered. I guess it is related to the fact it is in two separate modules?

@ecourtialecourtial changed the title[WIP] Config: add the possibility to use placeholders in EnumNodesConfig: add the possibility to use placeholders in EnumNodesMar 4, 2022
@nicolas-grekasnicolas-grekas changed the titleConfig: add the possibility to use placeholders in EnumNodesAllow using environment variables inEnumNodeMar 4, 2022
@carsonbotcarsonbot changed the titleAllow using environment variables inEnumNode[Config] Allow using environment variables inEnumNodeMar 4, 2022
nicolas-grekas added a commit that referenced this pull requestMar 8, 2022
… in EmumNode in 6.1 (ecourtial)This PR was merged into the 4.4 branch.Discussion----------Remove blocking test for adding support for placeholders in EmumNode in 6.1| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | no| New feature?  | no| Deprecations? | no| License       | MIT| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->Remove blocking test for the PR#45624Commits-------a0bce33 Remove blocking test for adding support for placeholders in EmumNode in 6.1
@fabpot
Copy link
Member

Thank you@ecourtial.

@vince83110
Copy link

maybe reasonable 👍

(the reason behind current behavior is we cant assume env values always fit the enum)

For my curiosity, why you didn't rely on the enum error itself ? If the env value doesn't fit the enum, you throw a correct error explaining that the value doesn't fit the enum. It is a weird behavior, thanks for the PR.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.1

Development

Successfully merging this pull request may close these issues.

6 participants

@ecourtial@carsonbot@ro0NL@fabpot@vince83110@nicolas-grekas

[8]ページ先頭

©2009-2025 Movatter.jp