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

[Console] Fix PHP deprecation when question value isnull#61123

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

Open
willemverspyck wants to merge1 commit intosymfony:6.4
base:6.4
Choose a base branch
Loading
fromwillemverspyck:6.4

Conversation

willemverspyck
Copy link
Contributor

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
Issues#61122
LicenseMIT

Add nullsafe and add NULL to test to catch the PHP deprecation.

@carsonbotcarsonbot added this to the6.4 milestoneJul 15, 2025
@willemverspyckwillemverspyck changed the titleFix PHP deprecation when question value is NULL[Console] Fix PHP deprecation when question value is NULLJul 15, 2025
@willemverspyckwillemverspyck marked this pull request as draftJuly 15, 2025 08:24
Fix testFix another 2 deprecationsFix testFix test
@willemverspyck
Copy link
ContributorAuthor

Not sure if I have to fix the fabbot.io error, because I didn't change that line.

@willemverspyckwillemverspyck marked this pull request as ready for reviewJuly 15, 2025 09:37
@OskarStarkOskarStark changed the title[Console] Fix PHP deprecation when question value is NULL[Console] Fix PHP deprecation when question value isnullJul 15, 2025
@stof
Copy link
Member

In the issue itself, you say yourselves

The value of the ChoiceQuestion array should not be NULL, but I can happen

I think you should rather fix your code to avoid passingnull

@ro0NL
Copy link
Contributor

IIUC from the issue3 => null, is the problem, and im wondering why SA tools arent telling us. Should we fix a phpdoc instead?

@willemverspyck
Copy link
ContributorAuthor

@stof I understand, but probably in PHP 8 you will get an error instead of a deprecation and developers might think the problem is in the Symfony core. But now I think more about this, maybe it's better to check if the value is a string or is stringable, otherwise throw an exception with "Must be string or stringable"? Didn't check, but probably you can also pass a integer (that will work as long as isn't strict), object or array.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ro0NLro0NLro0NL approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

4 participants
@willemverspyck@stof@ro0NL@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp