Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4dbc325

Browse filesBrowse files
committed
Better explain the command return codes
1 parent fda396e commit 4dbc325
Copy full SHA for 4dbc325

File tree

1 file changed

+8
-2
lines changed
Filter options

1 file changed

+8
-2
lines changed

‎console.rst

Copy file name to clipboardExpand all lines: console.rst
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,17 @@ 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. You can also use these constants to make code more readable
4952

53+
// return this if there was no problem running the command
54+
// (it's equivalent to returning int(0))
5055
return Command::SUCCESS;
5156

52-
// or return this if some error happened during the execution:
57+
// or return this if some error happened during the execution
58+
// (it's equivalent to returning int(1))
5359
// return Command::FAILURE;
5460
}
5561
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.