Ahm*_*ain 7 entities doctrine symfony
当我使用symfony2 shell并尝试运行时
doctrine:generate:entities [MyBundle] --path='src'
Run Code Online (Sandbox Code Playgroud)
要么
doctrine:generate:entities [MyBundle]
Run Code Online (Sandbox Code Playgroud)
我收到了这个错误
[Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_CLOSE_CURLY_BRACES, got '@' at position 255 in property
Run Code Online (Sandbox Code Playgroud)
所以请任何解决方案?
提前致谢
can*_*era 31
我也遇到过这个错误.这只是你的一个实体注释中的一个简单错字.快速检查您的实体将显示如下内容:
/**
* @ORM\Id
* @ORM\Column(type="integer" // note the missing close parentheses
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
Run Code Online (Sandbox Code Playgroud)
考虑到行号,它可能在您的一个实体关联映射中的某个位置.
正如cantera所说,检查花括号.
以下是一些symfony注释错误:
逗号
使用错误的类型
| 归档时间: |
|
| 查看次数: |
25321 次 |
| 最近记录: |