I\'m wondering how can I run Symfony 2 command from browser query or from controller.
Its because I don\'t have any possibility on hosting to run it
You can just simply create an instance of your command and run it:
/**
* @Route("/run-command")
*/
public function someAction()
{
// Running the command
$command = new YourCommand();
$command->setContainer($this->container);
$input = new ArrayInput(['--your_argument' => true]);
$output = new ConsoleOutput();
$command->run($input, $output);
return new Response();
}