8000 [DI] Force env params to be string|null by nicolas-grekas · Pull Request #20447 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DI] Force env params to be string|null #20447

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

Merged
merged 1 commit into from
Nov 9, 2016

Conversation

nicolas-grekas
Copy link
Member
Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets -
License MIT
Doc PR -

$bag = new EnvPlaceholderParameterBag();
$bag->get('env(ARRAY)');
$bag->set('env(ARRAY)', array());
$bag->resolve();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be in a separate test. Otherwise, throwing an exception in the first resolve would provide weird failures (saying that the expected message is wrong, while the issue is that an exception was not expected there).

Mixing 2 different tests in the same PHPunit test is a bad idea, as it makes it much harder to make them reliable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split

@fabpot
Copy link
Member
fabpot commented Nov 9, 2016

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 93c25f8 into symfony:master Nov 9, 2016
fabpot added a commit that referenced this pull request Nov 9, 2016
This PR was merged into the 3.2-dev branch.

Discussion
----------

[DI] Force env params to be string|null

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

93c25f8 [DI] Force env params to be string|null
@nicolas-grekas nicolas-grekas deleted the env-default branch November 10, 2016 08:24
@nicolas-grekas
Copy link
Member Author

Note for the reader: null was never allowed as a parameter value, and this PR didn't change that fact (thus, the PR title is misleading, sorry about that)

fabpot added a commit that referenced this pull request Nov 15, 2016
…s-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[DI] Fix accepting null as default env param value

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |  #20447
| License       | MIT
| Doc PR        | -

Commits
-------

7625166 [DI] Fix accepting null as default env param value
@fabpot fabpot mentioned this pull request Nov 17, 2016
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.

5 participants
0