Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] Fix casting scalar env vars from null#50517
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas left a comment
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.
I'm fine fixing this on 5.4 !
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedJun 1, 2023
Thank you@fancyweb. |
bendavies commentedJun 27, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
is this a not a BC break, or introducion of a regression? previously a env var with a default of null: parameters:env(SOME_VAR):~ 6.3.0: 6.3.1: |
fancyweb commentedJun 28, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@bendavies Can you open a new issue please with a reproducer and I'll look at it, thanks. |
…mpty string (fancyweb)This PR was merged into the 5.4 branch.Discussion----------[DependencyInjection] Fix autocasting null env values to empty string| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | -| Deprecations? | -| Tickets |#50815 (comment)| License | MIT| Doc PR | -This PR fixes autocasting `null` env values to `''`.We continue to autocast all other values to string when there's no prefix.It doesn't revert#50517, it just fixes an unintended side effect.It doesn'tfix#50815 request, it confirms the behavior: the solution for this issue would be to remove the `string:` prefix.There's still no solution to have the "keep null as null" and "cast if not null" behavior.Commits-------2c0815d [DependencyInjection] Fix autocasting null env values to empty string
…mpty string (fancyweb)This PR was merged into the 5.4 branch.Discussion----------[DependencyInjection] Fix autocasting null env values to empty string| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | -| Deprecations? | -| Tickets |symfony/symfony#50815 (comment)| License | MIT| Doc PR | -This PR fixes autocasting `null` env values to `''`.We continue to autocast all other values to string when there's no prefix.It doesn't revertsymfony/symfony#50517, it just fixes an unintended side effect.It doesn'tfixsymfony/symfony#50815 request, it confirms the behavior: the solution for this issue would be to remove the `string:` prefix.There's still no solution to have the "keep null as null" and "cast if not null" behavior.Commits-------2c0815d04e [DependencyInjection] Fix autocasting null env values to empty string
Uh oh!
There was an error while loading.Please reload this page.
Using a casting env var processor on
nullreturnsnull(it doesn't cast) which is not what one could expect and not what is documented. We could allow it.