title: Set a default environment variable in Symfony
body: <p>I am using Symfony 3.4 and I am trying to set a default value for an environment variable:</p>
  
  <p>I have a <code>.env</code> file at the root of my project containing:</p>
  
  <pre><code>DB_PASSWORD=someValue
  </code></pre>
  
  <p>and in my <code>app/config/parameters.yml</code>, I have the following:</p>
  
  <pre><code>parameters:
      ...
      database_password: '%env(DB_PASSWORD)%'
      ...
  </code></pre>
  
  <p>I would like to make the definition of the <code>DB_PASSWORD</code> variable optionnal in the <code>.env</code> file, but I can't find any documentation about how to do such a thing. </p>
  
  <p>I tried to do the following:</p>
  
  <pre><code>parameters:
      ...
      database_password: '%env(DB_PASSWORD, "default")%'
      ...
  </code></pre>
  
  <p>without success. </p>
  
  <p><strong>How can I define a default value for an environment variable in Symfony?</strong></p>