Skip to content
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

[Process] intersect with getenv() in case-insensitive manner to get default envs #44261

Merged

Conversation

stable-staple
Copy link
Contributor

@stable-staple stable-staple commented Nov 24, 2021

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #44260
License MIT
Doc PR

Since environment variables are case-insensitive in Windows, all envs should be compared in case-insensitive manner.

@carsonbot
Copy link

carsonbot commented Nov 24, 2021

Hey!

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

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 5.4 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

@stable-staple stable-staple changed the base branch from 5.4 to 4.4 Nov 24, 2021
@nicolas-grekas nicolas-grekas changed the title [Process] intersect with getenv() in case-insensitive manner to get d… [Process] intersect with getenv() in case-insensitive manner to get default envs Nov 25, 2021
@nicolas-grekas nicolas-grekas modified the milestones: 5.4, 4.4 Nov 25, 2021
@nicolas-grekas nicolas-grekas force-pushed the proc-getenv-caseinsensitive branch from cba3bb2 to 72d0204 Compare Nov 25, 2021
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Thanks for spotting and submitting this!
I updated the patch a bit to make it Windows-specific and add similar logic in other places that needed it.

@stof
Copy link
Member

stof commented Nov 25, 2021

is it possible to add tests covering this to avoid regressions ?

@nicolas-grekas nicolas-grekas force-pushed the proc-getenv-caseinsensitive branch from 72d0204 to ca64e23 Compare Nov 28, 2021
…efault envs

- since environment variables are case-insensitive in Windows,
  all envs should be compared in case-insensitive manner
@nicolas-grekas nicolas-grekas force-pushed the proc-getenv-caseinsensitive branch from ca64e23 to d78bc24 Compare Nov 28, 2021
@nicolas-grekas
Copy link
Member

nicolas-grekas commented Nov 28, 2021

I added a test case.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Nov 28, 2021

Thank you @stable-staple.

@nicolas-grekas nicolas-grekas merged commit f86c557 into symfony:4.4 Nov 28, 2021
9 of 10 checks passed
@stable-staple stable-staple deleted the proc-getenv-caseinsensitive branch Nov 28, 2021
This was referenced Nov 29, 2021
This was referenced Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Process] Windows REG utility not recognized as an internal or external command
4 participants