diff --git a/cookbook/console/commands_as_services.rst b/cookbook/console/commands_as_services.rst index 60f22824686..a60ebaa11e7 100644 --- a/cookbook/console/commands_as_services.rst +++ b/cookbook/console/commands_as_services.rst @@ -90,9 +90,9 @@ have some ``NameRepository`` service that you'll use to get your default value:: public function __construct(NameRepository $nameRepository) { - parent::__construct(); - $this->nameRepository = $nameRepository; + + parent::__construct(); } protected function configure()