/
[console] Command dependencies not loaded when auto-completing [5.3.0-B1]
[console] Command dependencies not loaded when auto-completing [5.3.0-B1]
The "AbstractCommand::initialize" method isn't called from "CompletionAwareInterface::completeOptionValues" and "CompletionAwareInterface::completeArgumentValues" methods and therefore command dependencies stay uninitialized during auto-completion process.
Solution
- create the "AbstractCommand::initDependencies" method
- make "AbstractCommand" implement the "CompletionAwareInterface" and in each method:
- call the "initDependencies" method
- return empty suggestions list
- call "initDependencies" method from "initialize" method as well.