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
[Console] PHP 8.1
PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated
#45179
Labels
Comments
Hi, can you send a PR on |
@chalasr This my first contribution for Symfony, did I forget something? Regards |
nicolas-grekas
added a commit
that referenced
this issue
Jan 26, 2022
…nSourceCode) This PR was submitted for the 6.0 branch but it was squashed and merged into the 4.4 branch instead. Discussion ---------- [Console] Fix PHP 8.1 deprecation in ChoiceQuestion | Q | A | ------------- | --- | Branch? | ~6.0~ 4.4 for bug fixes <!-- see below --> | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #45179 | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Commits ------- aa89814 [Console] Fix PHP 8.1 deprecation in ChoiceQuestion
Nerahikada
added a commit
to Nerahikada/DiscordPHP
that referenced
this issue
May 16, 2022
SQKo
pushed a commit
to discord-php/DiscordPHP
that referenced
this issue
May 23, 2022
* Move an operator in the wrong position * Fixed deprecations in php8.1 see: symfony/symfony#45179
Or |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BrokenSourceCode commentedJan 25, 2022
•
edited
Symfony version(s) affected
6.0.2
Description
Hi,
With Symfony/Console 6.0.2 and PHP 8.1, there is a depreciation on the method Symfony\Component\Console\Question\ChoiceQuestion::getDefaultValidator() (click on the link to see the line of the issue) :
This happens when the default value for the question is
null
.How to reproduce
Possible Solution
We can simply cast the variable to string to fix the issue. Just like this at this line:
Additional Context
No response
The text was updated successfully, but these errors were encountered: