title: Class 'Proxy\Factory' not found PHP error although file exists
body: <p>I downloaded this lib, extracted it and uploaded it to my php webspace: <a href="https://github.com/jenssegers/php-proxy" rel="nofollow noreferrer">https://github.com/jenssegers/php-proxy</a></p>
  
  <p>Also, I added a new index.php file with this content from the example included to the lib archive:</p>
  
  <pre><code>&lt;?php
  
  use Proxy\Factory;
  use Proxy\Response\Filter\RemoveEncodingFilter;
  use Symfony\Component\HttpFoundation\Request;
  
  require 'vendor/autoload.php';
  
  // Create the proxy factory.
  $proxy = Factory::create();
  
  // Add a response filter that removes the encoding headers.
  $proxy-&gt;addResponseFilter(new RemoveEncodingFilter());
  
  // Create a Symfony request based on the current browser request.
  $request = Request::createFromGlobals();
  
  // Forward the request and get the response.
  $response = $proxy-&gt;forward($request)-&gt;to('http://example.com');
  
  // Output response to the browser.
  $response-&gt;send();
  
  ?&gt;
  </code></pre>
  
  <p>The file structure looks like this (collapsed):</p>
  
  <p><a href="https://i.stack.imgur.com/unGqn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/unGqn.png" alt="Folder hierachy collcapsed"></a></p>
  
  <p>Expanded:</p>
  
  <p><a href="https://i.stack.imgur.com/OVXqk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OVXqk.png" alt="Expanded folder hierarchy"></a></p>
  
  <p>But when I run the script, I get this error:</p>
  
  <blockquote>
    <p>Fatal error: Class 'Proxy\Factory' not found in index.php on line 10</p>
  </blockquote>
  
  <p>Line 12 would be this:</p>
  
  <pre><code>$proxy = Factory::create();
  </code></pre>
  
  <p>Why does this happen? Shouldn't <code>use Proxy\Factory;</code> properly include the file Factory.php?</p>
  
  <hr>
  
  <p><strong>Update:</strong> The content of autoload.php is this:</p>
  
  <pre><code>&lt;?php
  
  // autoload.php @generated by Composer
  
  require_once __DIR__ . '/composer' . '/autoload_real.php';
  
  return ComposerAutoloaderInit60f173139b462a85925faf1b40913ce6::getLoader();
  </code></pre>