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 6d87827

Browse filesBrowse files
committed
fixing standard and fixing missing argument in php+xml formats
1 parent 6b1c640 commit 6d87827
Copy full SHA for 6d87827

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎cookbook/console/commands_as_services.rst

Copy file name to clipboardExpand all lines: cookbook/console/commands_as_services.rst
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ inject the ``command.default_name`` parameter:
135135
services:
136136
app.command.my_command:
137137
class: AppBundle\Command\MyCommand
138-
arguments: ['%command.default_name%']
138+
arguments: ["%command.default_name%"]
139139
tags:
140140
- { name: console.command }
141141
@@ -155,6 +155,7 @@ inject the ``command.default_name`` parameter:
155155
<services>
156156
<service id="app.command.my_command"
157157
class="AppBundle\Command\MyCommand">
158+
<argument>%command.default_name%</argument>
158159
<tag name="console.command" />
159160
</service>
160161
</services>
@@ -168,8 +169,9 @@ inject the ``command.default_name`` parameter:
168169
$container
169170
->register(
170171
'app.command.my_command',
171-
'AppBundle\Command\MyCommand'
172+
'AppBundle\Command\MyCommand',
172173
)
174+
->setArguments(array('%command.default_name%'))
173175
->addTag('console.command')
174176
;
175177

0 commit comments

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