<p dir="auto">I've created aliases for many of my commands which is nice for typing but it creates a lot of duplicates in the command list. e.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Available commands:
  ci                 Commit outstanding changes # ALIAS
  dependencies       Lists all installed vendor packages.
  deps               Lists all installed vendor packages. # ALIAS
  help               Displays help for a command
  install            Installs dependencies
  list               Lists commands
  merge              Merge all branch heads
  mysql              Start MySQL REPL
  napi               Rebuilds your napi.json locally
  optimize           Optimizes composer's autoloader by caching class paths
  pkg                Lists all installed vendor packages. # ALIAS
 hg
  hg:backout         Prepare a new changeset with the specified revisions undone
  hg:branches        List all named branches
  hg:commit          Commit outstanding changes
"><pre class="notranslate"><code class="notranslate">Available commands:
  ci                 Commit outstanding changes # ALIAS
  dependencies       Lists all installed vendor packages.
  deps               Lists all installed vendor packages. # ALIAS
  help               Displays help for a command
  install            Installs dependencies
  list               Lists commands
  merge              Merge all branch heads
  mysql              Start MySQL REPL
  napi               Rebuilds your napi.json locally
  optimize           Optimizes composer's autoloader by caching class paths
  pkg                Lists all installed vendor packages. # ALIAS
 hg
  hg:backout         Prepare a new changeset with the specified revisions undone
  hg:branches        List all named branches
  hg:commit          Commit outstanding changes

</code></pre></div>
<p dir="auto">It would be nice if instead the command list either excluded aliases, or put them in the description. e.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Available commands:
  dependencies       [deps|pkg] Lists all installed vendor packages.
  help               Displays help for a command
  install            Installs dependencies
  list               Lists commands
  merge              Merge all branch heads
  mysql              Start MySQL REPL
  napi               Rebuilds your napi.json locally
  optimize           Optimizes composer's autoloader by caching class paths
 hg
  hg:backout         Prepare a new changeset with the specified revisions undone
  hg:branches        List all named branches
  hg:commit          [ci] Commit outstanding changes"><pre class="notranslate"><code class="notranslate">Available commands:
  dependencies       [deps|pkg] Lists all installed vendor packages.
  help               Displays help for a command
  install            Installs dependencies
  list               Lists commands
  merge              Merge all branch heads
  mysql              Start MySQL REPL
  napi               Rebuilds your napi.json locally
  optimize           Optimizes composer's autoloader by caching class paths
 hg
  hg:backout         Prepare a new changeset with the specified revisions undone
  hg:branches        List all named branches
  hg:commit          [ci] Commit outstanding changes
</code></pre></div>
<p dir="auto">If you're worried about backwards compat or something, this can be made an option of the <code class="notranslate">Application</code> object. Right now it looks pretty hard-coded:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$this-&gt;commands[$command-&gt;getName()] = $command;

foreach ($command-&gt;getAliases() as $alias) {
    $this-&gt;commands[$alias] = $command;
}"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">commands</span>[<span class="pl-s1"><span class="pl-c1">$</span>command</span>-&gt;<span class="pl-en">getName</span>()] = <span class="pl-s1"><span class="pl-c1">$</span>command</span>;

<span class="pl-k">foreach</span> (<span class="pl-s1"><span class="pl-c1">$</span>command</span>-&gt;<span class="pl-en">getAliases</span>() <span class="pl-k">as</span> <span class="pl-s1"><span class="pl-c1">$</span>alias</span>) {
    <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">commands</span>[<span class="pl-s1"><span class="pl-c1">$</span>alias</span>] = <span class="pl-s1"><span class="pl-c1">$</span>command</span>;
}</pre></div>
<p dir="auto">Im running SF <code class="notranslate">2.3.4</code> and using the <code class="notranslate">src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php</code></p>
<p dir="auto">The session is not sync with DB when it's set, for example if I do this in a controller:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$this-&gt;get('session')-&gt;getFlashBag()-&gt;add('success', 'ok'); 
return $this-&gt;redirect($this-&gt;generateUrl('homepage'));"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-en">get</span>(<span class="pl-s">'session'</span>)-&gt;<span class="pl-en">getFlashBag</span>()-&gt;<span class="pl-en">add</span>(<span class="pl-s">'success'</span>, <span class="pl-s">'ok'</span>); 
<span class="pl-k">return</span> <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-en">redirect</span>(<span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-en">generateUrl</span>(<span class="pl-s">'homepage'</span>));</pre></div>
<p dir="auto">The flash message "ok" won't show up, I need to reload the page to get it.</p>
<p dir="auto">I think this bad behavior could be because of the mongoDb sync wich is not forced when writing session...</p>
<p dir="auto">Any ideas please ?</p>