From 4aec108acff18306af970b0d68a9429c446edcb9 Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Wed, 26 Aug 2020 20:30:56 +0200 Subject: [PATCH] Turn CommandList into `@api` to ensure backwards compatibility --- .../Magento/Framework/Console/CommandList.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/internal/Magento/Framework/Console/CommandList.php b/lib/internal/Magento/Framework/Console/CommandList.php index eddfd4e084536..f1c3c175b52b8 100644 --- a/lib/internal/Magento/Framework/Console/CommandList.php +++ b/lib/internal/Magento/Framework/Console/CommandList.php @@ -8,6 +8,7 @@ /** * Class CommandList has a list of commands, which can be extended via DI configuration. + * @api */ class CommandList implements CommandListInterface { @@ -17,7 +18,16 @@ class CommandList implements CommandListInterface protected $commands; /** - * Constructor + * CommandList constructor is being used for injecting new Commands + * + * Registration of new Commands can be done using `di.xml`: + * + * + * + * Vendor\Module\Console\Command\YourCommand + * + * + * * * @param array $commands */ @@ -27,9 +37,9 @@ public function __construct(array $commands = []) } /** - * {@inheritdoc} + * @inheritdoc */ - public function getCommands() + public function getCommands(): array { return $this->commands; }