title: Class not found after composer require
body: <p>I'm learning php and composer following the <a href="https://www.frobiovox.com/posts/2016/08/16/basic-hello-world-with-composer-and-php.html" rel="nofollow noreferrer">article</a></p>
  
  <p>I try to use external dependancy <code>composer require phpunit/php-timer</code>.</p>
  
  <p>Here is my composer.json:</p>
  
  <pre><code>{
    "name": "ypapax/composer_php_hello_world_log4php",
    "minimum-stability": "dev",
    "require": {
      "php": "&gt;= 7.2",
      "phpunit/php-timer": "^2.1@dev"
    },
    "autoload": {
      "psr-0": {
        "HelloWorld": "src/"
      },
      "classname": {
        "PHP_Timer": "src/"
      }
    }
  }
  </code></pre>
  
  <p>and my <code>test.php</code>:</p>
  
  <pre><code>&lt;?php
  
  // Autoload files using Composer autoloader.
  require_once __DIR__ . '/../vendor/autoload.php';
  
  use HelloWorld\Greetings;
  
  echo Greetings::sayHelloWorld();
  </code></pre>
  
  <p>Where greetings.php is</p>
  
  <pre><code>&lt;?php
  
  namespace HelloWorld;
  
  use PHP_Timer;
  
  class Greetings
  {
      public static function sayHelloWorld()
      {
          $timer = new PHP_Timer();
          $timer . start();
          return 'Hello World\n' . $timer-&gt;resourceUsage() . "\n";
      }
  }
  </code></pre>
  
  <p>When I run the test <code>php tests/test.php</code>
  it gives me an error:</p>
  
  <pre><code>PHP Fatal error:  Uncaught Error: Class 'PHP_Timer' not found in composer_php_hello_world_log4php/src/HelloWorld/Greetings.php:11
  Stack trace:
  #0 composer_php_hello_world_log4php/tests/test.php(8): HelloWorld\Greetings::sayHelloWorld()
  #1 {main}
    thrown in composer_php_hello_world_log4php/src/HelloWorld/Greetings.php on line 11
  
  Fatal error: Uncaught Error: Class 'PHP_Timer' not found in composer_php_hello_world_log4php/src/HelloWorld/Greetings.php:11
  Stack trace:
  #0 composer_php_hello_world_log4php/tests/test.php(8): HelloWorld\Greetings::sayHelloWorld()
  #1 {main}
    thrown in composer_php_hello_world_log4php/src/HelloWorld/Greetings.php on line 11
  </code></pre>
  
  <p>I guess something wrong is in composer.json:</p>
  
  <pre><code>"classname": {
        "PHP_Timer": "src/"
      }
  </code></pre>
  
  <p>PHP version:</p>
  
  <pre><code>$ php --version
  PHP 7.3.9 (cli) (built: Sep 14 2019 18:07:55) ( NTS )
  </code></pre>
  
  <p>Link to my <a href="https://github.com/ypapax/composer_php_hello_world_log4php" rel="nofollow noreferrer">test repo</a></p>
  
  <h1>Update</h1>
  
  <p>Here is my file <code>autoload_namespaces.php</code>:</p>
  
  <pre><code>&lt;?php
  
  // autoload_namespaces.php @generated by Composer
  
  $vendorDir = dirname(dirname(__FILE__));
  $baseDir = dirname($vendorDir);
  
  return array(
      'HelloWorld' =&gt; array($baseDir . '/src'),
  );
  </code></pre>
  
  <p>And autoload_classmap.php:</p>
  
  <pre><code>&lt;?php
  
  // autoload_classmap.php @generated by Composer
  
  $vendorDir = dirname(dirname(__FILE__));
  $baseDir = dirname($vendorDir);
  
  return array(
      'SebastianBergmann\\Timer\\Exception' =&gt; $vendorDir . '/phpunit/php-timer/src/Exception.php',
      'SebastianBergmann\\Timer\\RuntimeException' =&gt; $vendorDir . '/phpunit/php-timer/src/RuntimeException.php',
      'SebastianBergmann\\Timer\\Timer' =&gt; $vendorDir . '/phpunit/php-timer/src/Timer.php',
  );
  </code></pre>