Skip to content

Commit 0afbe2e

Browse files
committed
minor symfony#57965 [Console] fix permitted data type of the default choice (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- [Console] fix permitted data type of the default choice | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#53607 | License | MIT Commits ------- 2c8a951 fix permitted data type of the default choice
2 parents c4a84a9 + 2c8a951 commit 0afbe2e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/Console/Question/ChoiceQuestion.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ class ChoiceQuestion extends Question
2626
private string $errorMessage = 'Value "%s" is invalid';
2727

2828
/**
29-
* @param string $question The question to ask to the user
30-
* @param array $choices The list of available choices
31-
* @param mixed $default The default answer to return
29+
* @param string $question The question to ask to the user
30+
* @param array $choices The list of available choices
31+
* @param string|bool|int|float|null $default The default answer to return
3232
*/
33-
public function __construct(string $question, array $choices, mixed $default = null)
33+
public function __construct(string $question, array $choices, string|bool|int|float|null $default = null)
3434
{
3535
if (!$choices) {
3636
throw new \LogicException('Choice question must have at least 1 choice available.');

0 commit comments

Comments
 (0)