您是否忘记了另一个命名空间的“use”语句?

时间:2017-03-26 15:55:18

标签: symfony

我想在classe FicheController中创建一个评估实体,所以我使用了

use Polytech\SkillsBundle\Entity\SousOccasion;
use Polytech\SkillsBundle\Entity\Evaluation;
use Polytech\SkillsBundle\Entity\EvaluationCompetence;
.....

然后:

 $evaluation = new Evaluation();

但我收到此错误

Attempted to load class "Evaluation" from namespace "Polytech\SkillsBundle\Controller".
Did you forget a "use" statement for another namespace?

1 个答案:

答案 0 :(得分:0)

尝试$ evaluation = new Polytech \ SkillsBundle \ Entity \ Evaluation();