Skip to content

Commit 36ca326

Browse files
committed
Merge branch '5.1'
* 5.1: Use constants for the command status code Update input.rst
2 parents c69f736 + 920609b commit 36ca326

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

components/console/helpers/questionhelper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ the following to your command::
4040
$question = new ConfirmationQuestion('Continue with this action?', false);
4141

4242
if (!$helper->ask($input, $output, $question)) {
43-
return 0;
43+
return Command::SUCCESS;
4444
}
4545
}
4646
}

console/commands_as_services.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ For example, suppose you want to log something from within your command::
4545
{
4646
$this->logger->info('Waking up the sun');
4747
// ...
48-
49-
return 0;
48+
49+
return Command::SUCCESS;
5050
}
5151
}
5252

console/input.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ You now have access to a ``last_name`` argument in your command::
5252
}
5353

5454
$output->writeln($text.'!');
55+
56+
return Command::SUCCESS;
5557
}
5658
}
5759

0 commit comments

Comments
 (0)