我使用 PHP7 在我的服务器上安装了 symfony3 的 wellCommerce,我收到了这个错误:
FatalErrorException in AdminSubscriber.php line 74:
Parse Error: syntax error, unexpected ':', expecting ';' or '{'
产生此错误的代码是这个:
private function getUserRepository() : UserRepositoryInterface
{
return $this->get('user.repository');
}
我在 php7 上阅读了有关返回类型声明的信息,但我不知道为什么会出现此错误。
非常感谢你的帮助。