File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed
src/Symfony/Component/Console Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,19 @@ public function setCode($code)
294
294
public function mergeApplicationDefinition ($ mergeArgs = true )
295
295
{
296
296
if (null === $ this ->application || (true === $ this ->applicationDefinitionMerged && ($ this ->applicationDefinitionMergedWithArgs || !$ mergeArgs ))) {
297
+ if (!$ mergeArgs && $ this ->applicationDefinitionMergedWithArgs ) {
298
+ $ commandArgs = array_udiff (
299
+ $ this ->definition ->getArguments (),
300
+ $ this ->application ->getDefinition ()->getArguments (),
301
+ function ($ arg1 , $ arg2 ) {
302
+ return strcmp ($ arg1 ->getName (), $ arg2 ->getName ());
303
+ }
304
+ );
305
+
306
+ $ this ->definition ->setArguments ($ commandArgs );
307
+ $ this ->applicationDefinitionMergedWithArgs = false ;
308
+ }
309
+
297
310
return ;
298
311
}
299
312
Original file line number Diff line number Diff line change 2
2
help [options] [--] [<command_name>]
3
3
4
4
Arguments:
5
- command The command to execute
6
5
command_name The command name [default: "help"]
7
6
8
7
Options:
Original file line number Diff line number Diff line change 2
2
namespace:name
3
3
name
4
4
5
- <comment>Arguments:</comment>
6
- <info>command</info> The command to execute
7
-
8
5
<comment>Options:</comment>
9
6
<info>-h, --help</info> Display this help message
10
7
<info>-q, --quiet</info> Do not output any message
Original file line number Diff line number Diff line change 6
6
</usages>
7
7
<description>description</description>
8
8
<help>help</help>
9
- <arguments>
10
- <argument name="command" is_required="1" is_array="0">
11
- <description>The command to execute</description>
12
- <defaults/>
13
- </argument>
14
- </arguments>
9
+ <arguments/>
15
10
<options>
16
11
<option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0">
17
12
<description>Display this help message</description>
You can’t perform that action at this time.
0 commit comments