Symfony 从bin/vendors切换到composer.phar:带有注释的bug

Symfony 从bin/vendors切换到composer.phar:带有注释的bug,symfony,annotations,doctrine-orm,Symfony,Annotations,Doctrine Orm,以下是我的composer.json版本: 我以前在使用旧的php bin/vendors更新时没有遇到过这个问题 在课堂上,我有: AnnotationException: [Semantical Error] The annotation "@Doctrine\ORM\Mapping\generatedValue" in property MyNamespace\UserBundle\Entity\User::$id does not exist, or could not be auto-

以下是我的composer.json版本:

我以前在使用旧的php bin/vendors更新时没有遇到过这个问题

在课堂上,我有:

AnnotationException: [Semantical Error] The annotation "@Doctrine\ORM\Mapping\generatedValue" in property MyNamespace\UserBundle\Entity\User::$id does not exist, or could not be auto-loaded.

谢谢。

你试过使用@ORM\GeneratedValue吗?

你试过使用@ORM\GeneratedValue吗?

条令注释是关键敏感的,所以请使用

@ORM\GeneratedValue

而不是

@ORM\generatedValue


条令注释是关键敏感的,因此请使用

@ORM\GeneratedValue

而不是

@ORM\generatedValue

use Doctrine\ORM\Mapping as ORM;
...

/**
 * @ORM\Id
 * @ORM\Column(type="integer")
 * @ORM\generatedValue(strategy="AUTO")
 */
protected $id;