Skip to content

Commit bef1e59

Browse files
committed
minor #18085 [Console] Update style.rst (lougaou)
This PR was submitted for the 6.2 branch but it was merged into the 5.4 branch instead. Discussion ---------- [Console] Update style.rst "ask" signature expects a string as second parameter public function ask(string $question, string $default = null, callable $validator = null): mixed <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- fbb9fcb Update style.rst
2 parents ceb0df5 + fbb9fcb commit bef1e59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

console/style.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ User Input Methods
286286
In case you need to validate the given value, pass a callback validator as
287287
the third argument::
288288

289-
$io->ask('Number of workers to start', 1, function ($number) {
289+
$io->ask('Number of workers to start', '1', function ($number) {
290290
if (!is_numeric($number)) {
291291
throw new \RuntimeException('You must type a number.');
292292
}

0 commit comments

Comments
 (0)