After doing this: $ php app/console doctrine:generate:entities AppBundle/Entity/Item
I'm getting this error:
[RuntimeException]
The autoloader expected class "AppBundle\Entity\Item" to be defined in file "/home/user/symfony-projects/demo/src/AppBundle/Entity/Item.php". The file was found but the class was not in it, the class name or namespace probably has a typo.
This is my entity file:
// src/AppBundle/Entity/Item.php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="item")
*/
class Item
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string", length=128)
*/
protected $title;
/**
* @ORM\Column(type="integer")
*/
protected $userid;
/**
* @ORM\Column(type="datetime")
*/
protected $created;
/**
* @ORM\Column(type="string", lenght=64)
*/
protected $type;
/**
* @ORM\Column(type="string", lenght=64)
*/
protected $category;
/**
* @ORM\Column(type="string", lenght=64)
*/
protected $subcategory;
/**
* @ORM\Column(type="string", lenght=64)
*/
protected $location;
/**
* @ORM\Column(type="text")
*/
protected $description;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $image;
}
So I checked everything for a typo, and googled for about half an hour, and don't see where this error comes from. Any ideas? Thanks :)
So because it's saying my post is mostly code, I have to write something more.. but what should I tell you more? I like cake, coffee and cigarettes! :)