Skip to content

Commit f65a4ed

Browse files
committed
Tweaks
1 parent 0a45d57 commit f65a4ed

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

console.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ want a command to create a user::
4646
protected function execute(InputInterface $input, OutputInterface $output)
4747
{
4848
// ...
49-
49+
5050
return 0;
5151
}
5252
}
@@ -148,7 +148,7 @@ the console::
148148
// outputs a message without adding a "\n" at the end of the line
149149
$output->write('You are about to ');
150150
$output->write('create a user.');
151-
151+
152152
return 0;
153153
}
154154

@@ -199,7 +199,7 @@ which returns an instance of
199199
// (this example deletes the last two lines of the section)
200200
$section1->clear(2);
201201
// Output is now completely empty!
202-
202+
203203
return 0;
204204
}
205205
}
@@ -241,7 +241,7 @@ Use input options or arguments to pass information to the command::
241241

242242
// retrieve the argument value using getArgument()
243243
$output->writeln('Username: '.$input->getArgument('username'));
244-
244+
245245
return 0;
246246
}
247247

@@ -292,7 +292,7 @@ as a service, you can use normal dependency injection. Imagine you have a
292292
$this->userManager->create($input->getArgument('username'));
293293

294294
$output->writeln('User successfully generated!');
295-
295+
296296
return 0;
297297
}
298298
}
@@ -317,8 +317,13 @@ command:
317317

318318
:method:`Symfony\\Component\\Console\\Command\\Command::execute` *(required)*
319319
This method is executed after ``interact()`` and ``initialize()``.
320-
It contains the logic you want the command to execute.
321-
Must return an integer which will be used as the command `exit status`_.
320+
It contains the logic you want the command to execute and it should
321+
return an integer which will be used as the command `exit status`_.
322+
323+
.. deprecated:: 4.4
324+
325+
Not returning an integer with the exit status as the result of
326+
``execute()`` is deprecated since Symfony 4.4.
322327

323328
.. _console-testing-commands:
324329

0 commit comments

Comments
 (0)