Skip to content

Commit faf164b

Browse files
committed
minor #14488 More explication for return into execute command function (TheGarious)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- More explication for return into execute command function <!-- 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 `5.x` for features of unreleased versions). --> Actually, for 5.2 branch, we have got an explication for return into execute function into Command file with new Constant. But for 4.4 we don't have this constant and not explication what is return 1. Commits ------- eef382c More explication for return into execute command function
2 parents 62c7888 + eef382c commit faf164b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

console.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ want a command to create a user::
4545

4646
protected function execute(InputInterface $input, OutputInterface $output)
4747
{
48-
// ...
48+
// ... put here the code to run in your command
49+
50+
// this method must return an integer number with the "exit status code"
51+
// of the command.
4952

53+
// return this if there was no problem running the command
5054
return 0;
55+
56+
// or return this if some error happened during the execution
57+
// return 1;
5158
}
5259
}
5360

0 commit comments

Comments
 (0)