📅  最后修改于: 2022-03-11 14:54:25.389000             🧑  作者: Mango
For Vich Uploader
you need to use implements and public function serializable/unserializable.
class NameEntity implements Serializable
{
//code here
public function serialize()
{
return serialize($this->getId());
}
public function unserialize($serialized)
{
$this->id = unserialize($serialized);
}
}
It works for me.