Php ProxyManager\Configuration::setGeneratorStrategy()的返回值必须是ProxyManager\void的实例,无返回值
目前我正在使用Symfony framework 3.4。我的vagrant box正在运行PHP7.2.2。我在安装以下3个捆绑包之前,一切正常:Php ProxyManager\Configuration::setGeneratorStrategy()的返回值必须是ProxyManager\void的实例,无返回值,php,symfony,symfony-3.4,php-7.2,Php,Symfony,Symfony 3.4,Php 7.2,目前我正在使用Symfony framework 3.4。我的vagrant box正在运行PHP7.2.2。我在安装以下3个捆绑包之前,一切正常: almasaeed2010/adminlte 条令/数据装置 条令/条令迁移包 当我尝试访问任何页面时,出现以下错误: (1/1) FatalThrowableError Type error: Return value of ProxyManager\Configuration::setGeneratorStrategy() must be an
(1/1) FatalThrowableError
Type error: Return value of ProxyManager\Configuration::setGeneratorStrategy() must be an instance of ProxyManager\void, none returned
in Configuration.php (line 108)
at Configuration->setGeneratorStrategy(object(EvaluatingGeneratorStrategy))
in RuntimeInstantiator.php (line 37)
at RuntimeInstantiator->__construct()
in Kernel.php (line 828)
at Kernel->getContainerBuilder()
in Kernel.php (line 770)
at Kernel->buildContainer()
in Kernel.php (line 642)
at Kernel->initializeContainer()
in Kernel.php (line 137)
at Kernel->boot()
in Kernel.php (line 197)
at Kernel->handle(object(Request))
in app_dev.php (line 29)
我在谷歌上搜索了一下这个错误,发现使用旧PHP版本或旧版本的ocramius/proxy-manager
的人遇到了这个问题。但是没有人帮我解决这个问题,现在我陷入了困境
希望我能找到解决这个问题的办法。提前谢谢。您没有运行PHP7.2,甚至没有运行7.1,因为无法识别
void
类型。再次检查您的Vagrant配置。您确定应用程序正在7.2.2上运行吗?你检查过你的symfony档案器吗?嗨@IwanWijaya是的,我检查了档案器和php--版本,输出是PHP7.2.2。嗨,我可以给你我的php--version
命令的屏幕截图,它将是php cli。我不确定的一点是,我的应用程序是否也运行与php cli版本相同。是的,你是对的,出于一些奇怪的原因,甚至我将php版本更新为7.2.2,还将apache2服务器配置为在7.2.2上运行,并删除了旧的7.0.1,这是我的vagrant box的默认版本,出于一些奇怪的原因,它仍然在php 7.0.1上运行。我正在重新配置服务器。非常感谢。