8000 Update console.rst · symfony/symfony-docs@88fd7a7 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 88fd7a7

Browse files
vekienweaverryan
authored andcommitted
Update console.rst
Parent constructor call is required when using auto-wired services in a command constructor, without it you will receive the error: ``` There are no commands defined in the "app" namespace. ```
1 parent a5d47c6 commit 88fd7a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

console.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ as a service, you can use normal dependency injection. Imagine you have a
184184
public function __construct(UserManager $userManager)
185185
{
186186
$this->userManager = $userManager;
187+
188+
parent::__construct();
187189
}
188190

189191
// ...

0 commit comments

Comments
 (0)
0