I have Symfony 2 that has successfully installed and configured and was doing documentation through.
I am now up to http://symfony.com/doc/2.0/book/doctrine.html
Everything is fine until I get to this line:
php app/console doctrine:generate:entities Acme/StoreBundle/Entity/Product
at this moment i get the following error:
[RuntimeException] The autoloader expected class "Acme\StoreBundle\Entity\Product" to be defined in file "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\Symf ony\app/../src\Acme\StoreBundle\Entity\Product.php". The file was found but the class was not in it, the class name or namespace probably has a typo.
This happened to me on both Linux and Windows machines.
The content of Product.php corresponds to the tutorial:
// src/Acme/StoreBundle/Entity/Product.php namespace Acme\StoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="product") */ class Product { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\Column(type="string", length=100) */ protected $name; /** * @ORM\Column(type="decimal", scale=2) */ protected $price; /** * @ORM\Column(type="text") */ protected $description; }
source share