Skip to content

[Console] Update questionhelper.rst #16870

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
Jun 28, 2022

Conversation

issamkhadiri1989
Copy link
Contributor

hello,

when running the example as it is, a deprecation message is shown (i'm on PHP 8.1.6). the deprecation message says that trim(): Passing null to parameter #1 ($string) of type string is deprecated.
what if we add a normalizer that returns an empty string when the entered value is null otherwise returns the user's intial input. with this suggestion, the example works great

@carsonbot carsonbot added this to the 6.0 milestone Jun 12, 2022
@carsonbot carsonbot changed the title Update questionhelper.rst [Console] Update questionhelper.rst Jun 28, 2022
@javiereguiluz javiereguiluz modified the milestones: 6.0, 4.4 Jun 28, 2022
hello,

when running the example as it is, a deprecation message is shown (i'm on PHP 8.1.6). the deprecation message says that ``trim(): Passing null to parameter symfony#1 ($string) of type string is deprecated``.
what if we add a normalizer that returns an empty string when the entered value is `null` otherwise returns the user's intial input.  with this suggestion, the example works great
@javiereguiluz javiereguiluz changed the base branch from 6.0 to 4.4 June 28, 2022 15:28
@javiereguiluz javiereguiluz merged commit b24c8a4 into symfony:4.4 Jun 28, 2022
@javiereguiluz
Copy link
Member

Thanks Issam!

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.

3 participants