title: Silex can't find Controller Class
body: <p>Project directory structure</p>
  <pre><code>/composer.json
  /web/index.php
  /app/controller/IndexController.php 
  </code></pre>
  <p>composer.json</p>
  <pre><code>{
    &quot;require&quot; : {
      &quot;silex/silex&quot;: &quot;*&quot;
    },
    &quot;autoload&quot;: {
      &quot;psr-0&quot;: {
              &quot;&quot;: &quot;./&quot;
          }
    }
  }
  </code></pre>
  <p>index.php</p>
  <pre><code>&lt;?php
  
  require_once __DIR__.'/../vendor/autoload.php';
  
  use Silex\Application;
  
  $app = new Application();
  $app['debug'] = true;
  
  $app-&gt;get('/', 'App\\Controller\\IndexController::getIndex');
  
  $app-&gt;run();
  </code></pre>
  <p>IndexController.php</p>
  <pre><code>&lt;?php
  
  namespace App\Controller;
  
  use Silex\Application;
  
  class IndexController
  {
      public function getIndex(Application $app)
      {
          return &quot;You got the index, congrats!&quot;;
      }
  }
  </code></pre>
  <p>Whenever I</p>
  <pre><code>cd web/
  php -S localhost:8080
  curl http://localhost:8080
  </code></pre>
  <p>from the project root I get the the following exception</p>
  <pre><code>InvalidArgumentException in ControllerResolver.php line 153:
  Class &quot;App\Controller\IndexController&quot; does not exist.
  in ControllerResolver.php line 153
  at ControllerResolver-&gt;createController('App\Controller\IndexController::getIndex') in ControllerResolver.php line 80
  at ControllerResolver-&gt;getController(object(Request)) in HttpKernel.php line 135
  at HttpKernel-&gt;handleRaw(object(Request), '1') in HttpKernel.php line 68
  at HttpKernel-&gt;handle(object(Request), '1', true) in Application.php line 581
  at Application-&gt;handle(object(Request)) in Application.php line 558
  at Application-&gt;run() in index.php line 12
  </code></pre>
  <p>Which makes no sense to me. The program actually runs just fine locally on my MacBook but when I deploy it to my Ubuntu VPS I get the above exception even though the code being run in both environments is identical. Why can't Silex find my controller?</p>