title: Dotenv must be an instance of Dotenv\Loader
body: <p>I installed phpdotenv from vlucas using composer on a codeigniter project.</p>
  
  <p>I have added the hook as well which I am bit confused if needed for v3.3</p>
  
  <pre><code>    $hook['pre_system'] = function() {
      $dotenv = new Dotenv\Dotenv(APPPATH);
      $dotenv-&gt;load();
  };
  </code></pre>
  
  <p>If I don't add this hook I can't retrieve variables from my .env file. If I do add it, then I get this error:</p>
  
  <blockquote>
    <p>Message: Argument 1 passed to Dotenv\Dotenv::__construct() must be an
    instance of Dotenv\Loader, string given, called in
    C:\xampp\htdocs\test\application\config\hooks.php on line 15</p>
  </blockquote>
  
  <p>Filename: C:\xampp\htdocs\test\vendor\vlucas\phpdotenv\src\Dotenv.php</p>
  
  <p>Seems like the class is loading but it doesn't like the parameter "APPPATH" but all of the documentation I have found uses that. </p>
  
  <p>Any help appreciated</p>