ProxyManager\Configuration::setGeneratorStrategy() 的返回值必须是 ProxyManager\void 的一个实例,没有返回 [英] Return value of ProxyManager\Configuration::setGeneratorStrategy() must be an instance of ProxyManager\void, none returned

查看:36
本文介绍了ProxyManager\Configuration::setGeneratorStrategy() 的返回值必须是 ProxyManager\void 的一个实例,没有返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用的是 Symfony 框架 3.4.我的流浪盒子运行的是 PHP 7.2.2.在我安装以下 3 个捆绑包之前,我一切正常:

I am using Symfony framework 3.4 at the moment. My vagrant box is running PHP 7.2.2. I everything was working properly before i installed 3 bundles below:

  1. almasaeed2010/adminlte
  2. 教义/数据装置
  3. doctrine/doctrine-migrations-bundle

当我尝试访问任何页面时出现以下错误:

I am getting below error when i am trying to access any page:

(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 的人遇到了问题.但是没有人帮我解决这个问题,现在我被卡住了.

I did some google about this error and i found that people with older PHP version or older version of ocramius/proxy-manager was having the problem. But none helped me to solve this issue and now i am stuck.

希望我能找到解决这个问题的方法.提前致谢.

Hope i will find some solution for this problem. Thank you in advance.

推荐答案

您运行的不是 PHP 7.2,甚至不是 7.1,因为无法识别 void 类型.再次检查您的 Vagrant 配置.

You're not running PHP 7.2, not even 7.1, because the void type is not recognized. Check again your Vagrant configuration.

这篇关于ProxyManager\Configuration::setGeneratorStrategy() 的返回值必须是 ProxyManager\void 的一个实例,没有返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆