После этого: $ php app/console doctrine:generate:entities AppBundle/Entity/Item
Я получаю эту ошибку:
[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.
Это мой файл сущности:
// 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;
}
Поэтому я проверил все для опечатки и искал в Google примерно полчаса, и не вижу, откуда эта ошибка. Есть идеи? Благодаря :)
Поэтому, поскольку он говорит, что мой пост - это в основном код, мне нужно написать что-то еще... но что я должен сказать вам больше? Мне нравится пирог, кофе и сигареты! :)
возникла проблема...
У меня действительно были некоторые опечатки в моем коде. Я написал длину вместо длины несколько раз.. черт возьми, нелегко увидеть;)
Спасибо за вашу помощь в любом случае :)