-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split
b15f107
to
93c25f8
Compare
Thank you @nicolas-grekas. |
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
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) |
…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