8000 minor #41987 [Console] SymfonyStyle - add string type to confirm() $q… · symfony/symfony@2576663 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2576663

Browse files
committed
minor #41987 [Console] SymfonyStyle - add string type to confirm() $question by co… (TomasVotruba)
This PR was merged into the 5.2 branch. Discussion ---------- [Console] SymfonyStyle - add string type to confirm() $question by co… PR retargeted from Symfony 5.4: #41983 Inspired by & follow up to #41946 by `@nicolas`-grekas <br> This type is always string, see contract https://github.com/symfony/symfony/blob/5010ebdad90e9e0889e6a66ff9ad7b290bd00bae/src/Symfony/Component/Console/Style/StyleInterface.php#L102 Also `ConfirmationQuestion` requires `string` strict type bellow Probably forgotten during adding types everywhere in #32318 | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | no | New feature? | no | Deprecations? | no | License | MIT Commits ------- d0c337d [Console] SymfonyStyle - add string type to confirm() $question by contract
2 parents 07060f4 + d0c337d commit 2576663

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Console/Style/SymfonyStyle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public function askHidden(string $question, callable $validator = null)
288288
/**
289289
* {@inheritdoc}
290290
*/
291-
public function confirm($question, $default = true)
291+
public function confirm(string $question, bool $default = true)
292292
{
293293
return $this->askQuestion(new ConfirmationQuestion($question, $default));
294294
}

0 commit comments

Comments
 (0)
0