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

Fix $_ENV/$_SERVER precedence in test framework#24686

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:3.3fromfabpot:test-fix
Oct 26, 2017

Conversation

@fabpot
Copy link
Member

QA
Branch?3.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

When defining env vars values inphpunit.xml.dist, we are using<env ...>. PHPUnit registers those env vars in$_ENV, but not in$_SERVER. This means that those values might not be used by Symfony if env vars defined in.env are automatically registered (which is my case).

In any case, I think it makes sense to make$_ENV take precedence as this is how we register them inphpunit.xml.dist.

@nicolas-grekas
Copy link
Member

Shouldn't we also change the precedence in src/Symfony/Component/DependencyInjection/Container.php?

@nicolas-grekasnicolas-grekas added this to the3.3 milestoneOct 25, 2017
@fabpot
Copy link
MemberAuthor

I've made the change in Container.php for better consistency. Should be ready now.

@fabpotfabpot merged commit6ed9919 intosymfony:3.3Oct 26, 2017
fabpot added a commit that referenced this pull requestOct 26, 2017
This PR was merged into the 3.3 branch.Discussion----------Fix $_ENV/$_SERVER precedence in test framework| Q             | A| ------------- | ---| Branch?       | 3.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aWhen defining env vars values in `phpunit.xml.dist`, we are using `<env ...>`. PHPUnit registers those env vars in `$_ENV`, but not in `$_SERVER`. This means that those values might not be used by Symfony if env vars defined in `.env` are automatically registered (which is my case).In any case, I think it makes sense to make `$_ENV` take precedence as this is how we register them in `phpunit.xml.dist`.Commits-------6ed9919 fixed $_ENV/$_SERVER precedence in test framework
This was referencedOct 30, 2017
@fabpotfabpot mentioned this pull requestNov 10, 2017
@fabpotfabpot deleted the test-fix branchJanuary 14, 2019 11:01
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr approved these changes

+1 more reviewer

@ogizanagiogizanagiogizanagi approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

6 participants

@fabpot@nicolas-grekas@javiereguiluz@ogizanagi@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp