報錯:
Catchable Fatal Error: Object of class App\Entity\ProjectType could not be converted to string
版本:symfony5.0
解決辦法:
在對應的Entity裏添加public __toString方法,我這裏就是App\Entity\ProjectType類
// App\Entity\ProjectType
public function __toString(){
return strval($this->getId());
}