An example of a class of a certain command:
<?php namespace AppBundle\Command; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class NewCommand extends Command { protected function configure() { $this ->setName('new-command') ->setDescription('Creates a new user.') ->setHelp('This command allows you to create a user...'); } protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln('New command'); } } How does symfony find this class and register it as a console command? After all, when autoloading, it is impossible to determine which classes are inherited from the base class (in this case, the Command class).