title: Symfony 4 Doctrine, creating Entities from database table
body: <p>New to Symfony here
  I am following <a href="http://symfony.com/doc/current/doctrine/reverse_engineering.html" rel="nofollow noreferrer">this</a> tutorial about mapping db tables to entities. I created the <code>blog_post</code> and <code>blog_comment</code> tables in my db. 
  I tried running this <code>php bin/console doctrine:mapping:import --force AppBundle xml</code> which spit out the following error.</p>
  
  <pre><code>Bundle "AppBundle" does not exist or it is not enabled. Maybe you forgot to 
  add it in the registerBundles() method of your App\Kernel.php file? 
  </code></pre>
  
  <p>My <code>doctrine.yaml</code> is pretty much out of the box. </p>
  
  <p>Doctrine.yaml</p>
  
  <pre><code>doctrine:
  dbal:
      # configure these for your database server
      driver: 'pdo_mysql'
      server_version: '5.7'
      charset: utf8mb4
  
      # With Symfony 3.3, remove the `resolve:` prefix
      url: '%env(resolve:DATABASE_URL)%'
  orm:
      auto_generate_proxy_classes: '%kernel.debug%'
      naming_strategy: doctrine.orm.naming_strategy.underscore
      auto_mapping: true
      mappings:
          App:
              is_bundle: true
              type: annotation
              dir: '%kernel.project_dir%/src/Entity'
              prefix: 'App\Entity'
              alias: App
  </code></pre>
  
  <p>I created the App.php Class under <code>src/Entity/</code> and added a line under <code>bundles.php</code> but still get an error. The line I added on bundles.php is
  <code>App\Entity\App::class=&gt;['all' =&gt; true],</code> since that is the defined namespace of my App.php class.</p>
  
  <p>Another error I get is</p>
  
  <pre><code>PHP Fatal error:  Uncaught 
  Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load 
  class "App" from namespace "App\Entity\App".
  Did you forget a "use" statement for another namespace? in 
  /var/www/html/quick_tour/src/Kernel.php:32
  </code></pre>