title: Best way to store configs in a php composer project?
body: <p><strong>When we are not using a framework</strong>, </p>
  
  <ol>
  <li><p>what is the <strong>best way to store configs</strong> in a composer project and how we can load them from a controller or a model file? prefer we can store configs outside the <code>src</code> folder.</p></li>
  <li><p>why nobody using <strong>class constants</strong> to store configs</p></li>
  </ol>
  
  <p>ex. App/Config/AppConfig::TIMEZONE;</p>
  
  <p><strong>- composer.json</strong></p>
  
  <pre><code>"autoload": 
  {
      "psr-4": 
      { 
          "App\\": "src/app/" 
      }
  }
  </code></pre>
  
  <p><strong>- /src/app/Configs/AppConfig.php</strong></p>
  
  <pre><code>namespace App\Configs;
  
  class AppConfig {
      const TIMEZONE = 'EST';
  }
  </code></pre>
  
  <p><strong>- src/app/Controllers/HelloWorld.php</strong></p>
  
  <pre><code>namespace App\Controllers;
  use App\Configs\AppConfig;
  
  class HelloWorld
  {
      $timezone = AppConfig::TIMEZONE;
  }
  </code></pre>
  
  <p>Thanks</p>