title: Why is my Silex autoloader (composer) not loading a class?
body: <p>I'm using composer to load classes. It does work for a provider, but it does not load my classes folder. This is my composer.json : </p>
  
  <pre><code>{
      "require": {
          "silex/silex": "~1.3",
          "twig/twig": "^1.33",
          "doctrine/dbal": "^2.5",
          "uploadcare/uploadcare-php": "^1.5",
          "symfony/twig-bridge": "^2.8",
          "symfony/form": "^2.8",
          "symfony/security-csrf": "^2.8",
          "symfony/validator": "^2.8",
          "symfony/config": "^2.8",
          "symfony/translation": "^2.8"
      },
      "autoload": {
          "psr-4": {
              "Models\\": "app/Models/",
              "Providers\\": "app/Providers/"
          }
      }
  }
  </code></pre>
  
  <p>And this is my folder structure:</p>
  
  <blockquote>
    <p>Webshop<br>--app<br>----Config<br>----Models<br>---->>Session.php<br>----Providers<br>--public<br>----index.php<br>--vendor<br>--views<br>--composer.jason<br>--composer.lock</p>
  </blockquote>
  
  <p>This line is in index.php:</p>
  
  <pre><code>require_once __DIR__.'/../vendor/autoload.php';
  </code></pre>
  
  <p>But I get this error for some reason:</p>
  
  <pre><code>Fatal error: Class 'Session' not found in E:\Software\XAMPP\htdocs\Webshop\public\index.php on line 32
  </code></pre>
  
  <p>And in case you might need it, I can give you the session class of course. If anything needs to be added. Please ask and I'll add it within a minute.</p>
  
  <p>Edit</p>
  
  <hr>
  
  <p>This is my Session top:</p>
  
  <pre><code>&lt;?php
  
  namespace Models;
  
  class Session 
      {
          public static function exists($name) 
          {
  </code></pre>