title: Class not found in psr-4 composer autoloading
body: <p>I have a base folder with a vendor folder which include composer folder and my created folder src. The src folder contain all classes required to work.</p>
  
  <p>In src folder, I have class example below</p>
  
  <pre><code>&lt;?php
  
      namespace Test;
  
      class Example{
          public function display(){
              echo "This is Example Class";
          }
      }
  
   ?&gt;
  </code></pre>
  
  <p>my composer.json has following content: </p>
  
  <pre><code>{
      "autoload":{
          "psr-4":{
              "Test\\":"src"
          }
      }   
  }
  </code></pre>
  
  <p>and finally I am creating the instance of example class in a test file in base folder: </p>
  
  <pre><code>&lt;?php
  
      require 'vendor/autoload.php';
  
      $a=new Test\Example();
      $a-&gt;display();
  
  
  ?&gt;
  </code></pre>
  
  <p>The issue is when i try to run test file the following error occurred: <strong>[Fatal error: Uncaught Error: Class 'Test\Example' not found.]</strong></p>
  
  <p>Please help me what I am doing wrong, <a href="https://i.stack.imgur.com/ARXPh.png" rel="nofollow noreferrer">Here</a> is the screen shot of  directory structure.
  Thanks in advance.</p>