title: Environment variables not working in Phalcon Config
body: <p>I have a Phalcon project with this library added: <a href="https://github.com/vlucas/phpdotenv" rel="nofollow">https://github.com/vlucas/phpdotenv</a>. This library is meant to load some environment variables from a .env file. I created such a file and put it in my project.</p>
  
  <pre><code>VERSION_NUMBER=3.14 
  
  DATABASE_HOST=localhost
  DATABASE_NAME=test
  DATABASE_USER=root
  DATABASE_PASS=root
  </code></pre>
  
  <p>I rewrote my <code>loader.php</code> file to the code below:</p>
  
  <pre><code>&lt;?php
  $loader = new \Phalcon\Loader();
  
  /**
   * We're a registering a set of directories taken from the configuration file
   */
  $loader-&gt;registerNamespaces(array(
      'Test\Models' =&gt; $config-&gt;application-&gt;modelsDir,
      'Test\Controllers' =&gt; $config-&gt;application-&gt;controllersDir,
      'Test\Forms' =&gt; $config-&gt;application-&gt;formsDir,
      'Test\Classes' =&gt; $config-&gt;application-&gt;classesDir,
      'Test\Classes\Excel' =&gt; $config-&gt;application-&gt;excelDir,
      'Test' =&gt; $config-&gt;application-&gt;libraryDir
  ));
  
  $loader-&gt;register();
  
  // Use composer autoloader to load vendor classes
  require_once __DIR__ . '/../../vendor/autoload.php';
  
  $dotenv = new Dotenv\Dotenv(__DIR__);
  $dotenv-&gt;required(['DATABASE_HOST', 'DATABASE_NAME', 'DATABASE_USER', 'DATABASE_PASS']);
  $dotenv-&gt;overload();
  </code></pre>
  
  <p>And in my config file I replaced the keys with the environment variables:</p>
  
  <pre><code>'database' =&gt; array(
      'adapter'  =&gt; 'Mysql',
      'host'     =&gt; getenv('DATABASE_HOST'),
      'username' =&gt; getenv('DATABASE_USER'),
      'password' =&gt; getenv('DATABASE_PASS'),
      'dbname'   =&gt; getenv('DATABASE_NAME')
  ),
  </code></pre>
  
  <p>I can echo <code>getenv('VERSION_NUMBER')</code> where I want and it works every time, but when I try to use this config file the variables are empty. What am I doing wrong?</p>