title: problems when using cache clear command in symfony controller action method
body: <p>I try use the following codes to clear cache by web way, but I got the response message:</p>
  
  <blockquote>
    <p>// Clearing the cache for the dev environment with debug // true
    [Symfony\Component\Debug\Exception\ContextErrorException] Warning:
    ini_set(): A session is active. You cannot change the session modu
    le's ini settings at this time cache:clear [--no-warmup]
    [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose]
    [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env
    ENV] [--no-debug] [--]</p>
  </blockquote>
  
  <p><strong>My code is as follows:</strong></p>
  
  <pre><code>/**
  * @Route("/cache/clear", name="cache_clear")
  */
  public function cacheClearAction( ) 
  {
      $application = new Application($this-&gt;get('kernel'));
      $application-&gt;setAutoExit(false);//exit after run
      $input = new ArrayInput([
          'command' =&gt; 'cache:clear',
          '--env'   =&gt; 'dev',
      ]);
      $output = new BufferedOutput();
      $runCode = $application-&gt;run($input, $output);
      $content = $output-&gt;fetch();
      return new Response($content);
  }
  </code></pre>
  
  <p>ps:my php.ini session.auto_start => Off => Off</p>