title: Doing a "composer install" inside a Symfony console
body: <p>I have to launch inside a working directory a composer install after a jQuery success (I'm developing a git panel under Silex).
  I have been told it could be well done with Symfony Console, because it can keep some options.
  But I have really no idea how to call it.</p>
  <p>I created a class which extends Command, I think I got to implement it under execute method...</p>
  <pre><code>class ComposerCommand extends Command
  {
      protected function configure()
      {
          $this
              -&gt;setName('composer:install')
              -&gt;setDescription('Composer install')
              -&gt;addArgument()
              -&gt;addOption()
          ;
      }
  
      protected function execute(InputInterface $input, OutputInterface $output)
      {
          $name = $input-&gt;getArgument('name');
          
      }
  }
  </code></pre>
  <p>I tried this:</p>
  <pre><code>    &lt;?php
  namespace App\Console\Command;
  
  use Symfony\Component\Console\Command\Command;
  use Symfony\Component\Console\Input\InputInterface;
  use Symfony\Component\Console\Output\OutputInterface;
  use Symfony\Component\Console\Input\InputArgument;
  use Symfony\Component\Console\Input\InputOption;
  
  class TestCommand extends Command {
  
  
      protected function configure() {
          $this-&gt;setName(&quot;test&quot;)
              -&gt;setDescription(&quot;Sample description for our command named test&quot;)
              -&gt;setDefinition(array(
                  new InputOption('flag', 'f', InputOption::VALUE_NONE, 'Raise a flag'),
                  new InputArgument('activities', InputArgument::IS_ARRAY, 'Space-separated activities to perform', null),
              ))
  
              -&gt;setHelp(&lt;&lt;&lt;EOT
  The &lt;info&gt;test&lt;/info&gt; command does things and stuff
  EOT
              );
      }
  
      protected function execute(InputInterface $input, OutputInterface $output) {
          try {
              \Phar::mapPhar('composer.phar');
              include 'phar://composer.phar/demarrage.php';
          } catch (\Exception $e) {
              throw new \Exception($e);
          }
  
      }
  }
  </code></pre>
  <p>Still doesn't work.</p>