<p dir="auto">Running</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="php app/console doctrine:generate:entities MyBundle:MyEntity"><pre class="notranslate"><code class="notranslate">php app/console doctrine:generate:entities MyBundle:MyEntity
</code></pre></div>
<p dir="auto">on v2.5.0 I get</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Deprecated: getEntityNamespace is deprecated since Symfony 2.1. Use
getAliasNamespace instead in .../Doctrine/Bundle/DoctrineBundle/Registry.php
on line 129"><pre class="notranslate"><code class="notranslate">Deprecated: getEntityNamespace is deprecated since Symfony 2.1. Use
getAliasNamespace instead in .../Doctrine/Bundle/DoctrineBundle/Registry.php
on line 129
</code></pre></div>
<p dir="auto">Can I have this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="No more app_dev.php  or app.php"><pre class="notranslate"><code class="notranslate">No more app_dev.php  or app.php
</code></pre></div>
<p dir="auto">Just</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="index.php"><pre class="notranslate"><code class="notranslate">index.php
</code></pre></div>
<p dir="auto">So what about environments?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="config/app.yml"><pre class="notranslate"><code class="notranslate">config/app.yml
</code></pre></div>
<p dir="auto">What would be in it?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="app
    environments:   ['local'=&gt;'local.domain', 'dev'=&gt;'dev.mysite']"><pre class="notranslate"><code class="notranslate">app
    environments:   ['local'=&gt;'local.domain', 'dev'=&gt;'dev.mysite']
</code></pre></div>
<hr>
<p dir="auto">Then I propose an environment detection that loops trough the array in the app config<br>
and loads the right config files, ONLY if they are present. Else they will fall back to default.</p>
<p dir="auto">So.. how would that look like? Folder structure:<br>
The current situation and the default config file for persistence info:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="config/database.yml"><pre class="notranslate"><code class="notranslate">config/database.yml
</code></pre></div>
<p dir="auto">Then if I would like to have a different config for dev:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="config/dev/database.yml"><pre class="notranslate"><code class="notranslate">config/dev/database.yml
</code></pre></div>
<p dir="auto">This will override only the differences. For example.. the password or db user</p>
<p dir="auto">Then if I would like to have a different config for staging:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="config/staging/database.yml"><pre class="notranslate"><code class="notranslate">config/staging/database.yml
</code></pre></div>
<p dir="auto">Great!</p>