How to run command from bundle in app controller in Symfony3? How to run command from bundle in app controller in Symfony3? symfony symfony

How to run command from bundle in app controller in Symfony3?


It is a common mistake to import:

use Symfony\Component\Console\Application;

instead of:

use Symfony\Bundle\FrameworkBundle\Console\Application;

So make sure to import the second class (from FrameworkBundle) to load all configured commands (external or not) correctly.