title: Can't map table to Symfony - Doctrine entity. The file was not found but the class was not in it, the class name or namespace probably has a typo
body: <p>I am trying to follow the official Symfony manual (just the name of table is different) and want to map my database table with the Entity. I created a class that is based on (copy/pasted the URL and file name, so typo is impossible):</p>
  
  <blockquote>
    <p>C:\xampp\htdocs\goodstuff\src\AppBundle\Entity\Customer.php</p>
  </blockquote>
  
  <p>The source code of class file:</p>
  
  <pre><code>namespace AppBundle\Entity;
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="customer")
   */
  class Customer
  {
          /**
       * @ORM\Column(type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      protected $id;
      /**
       * @ORM\Column(type="string", length=255)
       */ 
      protected $first_name;
      /**
       * @ORM\Column(type="string", length=255)
       */     
      protected $last_name;
      /**
       * @ORM\Column(type="string", length=255)
       */     
      protected $mid_name;
      /**
       * @ORM\Column(type="string", length=100)
       */     
      protected $phone;
      /**
       * @ORM\Column(type="string", length=100)
       */     
      protected $email;
      /**
       * @ORM\Column(type="string", length=1000)
       */     
      protected $comments;
  
  }
  </code></pre>
  
  <p>then I ran the command:</p>
  
  <blockquote>
    <p>c:\xampp\htdocs\goodstuff>....\php\php app\console
    octrine:generate:entities AppBundle/Entity/Customer</p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>c:\xampp\htdocs\goodstuff>....\php\php app\console
    octrine:generate:entities AppBundle\Entity\Customer</p>
  </blockquote>
  
  <p>In both cases I am getting the same error message:</p>
  
  <pre><code>c:\xampp\htdocs\goodstuff&gt;..\..\php\php app\console doctrine:generate:entities AppBundle/Entity/Customer
  
  namespace AppBundle\Entity;
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="customer")
   */
  class Customer
  {
              /**
       * @ORM\Column(type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
          protected $id;
      /**
       * @ORM\Column(type="string", length=255)
       */
          protected $first_name;
      /**
       * @ORM\Column(type="string", length=255)
       */
          protected $last_name;
      /**
       * @ORM\Column(type="string", length=255)
       */
          protected $mid_name;
      /**
       * @ORM\Column(type="string", length=100)
       */
          protected $phone;
      /**
       * @ORM\Column(type="string", length=100)
       */
          protected $email;
      /**
       * @ORM\Column(type="string", length=1000)
       */
          protected $comments;
  
  }
  
  
  
  
    [RuntimeException]
    The autoloader expected class "AppBundle\Entity\Customer" to be defined in file "C:\xampp\htdocs\goodstuff/src\AppBundle\Entity\Customer.php". The file was found but the class was not in it, the class name or namespace probab  ly has a typo.
  
  
  
  doctrine:generate:entities [--path="..."] [--no-backup] name
  </code></pre>