1
当林建设一个功能,想输入一个暗示与PARAM是实现给定接口我已经得到这样一个错误的实体:Doctrine2实体接口和类型提示
AddToFavorite::AddToFavorite() must be an instance of Trendmed\Interfaces\Favoriteable, instance of Proxy\__CG__\Trendmed\Entity\Clinic given
当然,我的实体的正在实现给定的接口。
我认为这是因为Doctrine代理类没有直接实现接口,实体类从而禁止我从适当的接口类型提示。你有解决这个问题的办法吗?
主干代理继承实体,以便类型提示按预期工作。检查Trendmed \ Entity \ Clinic是否实现了Trendmed \ Interfaces \ Favoriteable – arnaud576875 2012-07-06 11:19:30
是的,但不起作用,因为Im类型暗示它。 – 2012-07-06 11:45:29
你如何解决它?请分享 – 2014-07-20 09:44:51