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