From 74d6d3972b9fb746ecbe50f7bd9864b10c4c201d Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 9 Aug 2024 16:39:52 +0200 Subject: [PATCH 1/3] fix permitted data type of the default choice --- Question/ChoiceQuestion.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Question/ChoiceQuestion.php b/Question/ChoiceQuestion.php index e449ff683..465f3184f 100644 --- a/Question/ChoiceQuestion.php +++ b/Question/ChoiceQuestion.php @@ -26,11 +26,11 @@ class ChoiceQuestion extends Question private string $errorMessage = 'Value "%s" is invalid'; /** - * @param string $question The question to ask to the user - * @param array $choices The list of available choices - * @param mixed $default The default answer to return + * @param string $question The question to ask to the user + * @param array $choices The list of available choices + * @param string|bool|int|float|null $default The default answer to return */ - public function __construct(string $question, array $choices, mixed $default = null) + public function __construct(string $question, array $choices, string|bool|int|float|null $default = null) { if (!$choices) { throw new \LogicException('Choice question must have at least 1 choice available.'); From f96ee2a1098d49efe0df54f47474a6398c04869c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 13 Aug 2024 15:55:12 +0200 Subject: [PATCH 2/3] [PhpUnitBridge][Console][VarDumper] Fix handling NO_COLOR env var --- Output/StreamOutput.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Output/StreamOutput.php b/Output/StreamOutput.php index 72479f8a2..b53955269 100644 --- a/Output/StreamOutput.php +++ b/Output/StreamOutput.php @@ -91,7 +91,7 @@ protected function doWrite(string $message, bool $newline) protected function hasColorSupport() { // Follow https://no-color.org/ - if ('' !== ($_SERVER['NO_COLOR'] ?? getenv('NO_COLOR') ?: '')) { + if ('' !== (($_SERVER['NO_COLOR'] ?? getenv('NO_COLOR'))[0] ?? '')) { return false; } From c24bcd08af1fde7c0026d0201a5ae7627db6ad81 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 28 Jul 2024 09:27:30 +0200 Subject: [PATCH 3/3] [Console] Fix side-effects from running bash completions --- Resources/completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/completion.bash b/Resources/completion.bash index 64b87ccf7..bb44037b0 100644 --- a/Resources/completion.bash +++ b/Resources/completion.bash @@ -7,7 +7,7 @@ _sf_{{ COMMAND_NAME }}() { # Use newline as only separator to allow space in completion values - IFS=$'\n' + local IFS=$'\n' local sf_cmd="${COMP_WORDS[0]}" # for an alias, get the real script behind it