Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lumen+swoole无法获取request信息。 #1032

Closed
elrond-g opened this issue Nov 21, 2017 · 3 comments
Closed

lumen+swoole无法获取request信息。 #1032

elrond-g opened this issue Nov 21, 2017 · 3 comments

Comments

@elrond-g
Copy link

我用的环境

PHP 版本:7.1
overtrue/wechat 版本:master线
是否使用了框架?框架名称:lumen+swoole

问题及现象

swoole不存在global了,然而这里获取request的方式还是从"php:\input"获取。
wechat/src/Kernel/ServiceContainer.php
130 * Register request.
131 *
132 * @return $this
133 */
134 protected function registerRequest()
135 {
136 isset($this['request']) || $this['request'] = function () {
137 return Request::createFromGlobals();
138 };
139
140 return $this;
141 }
142

如果以后

描述你的问题现象,报错贴截图粘贴或者贴具体信息,提供必要的代码段

如果你不提供相关的代码,我不会做任何应答,直接 close,感谢!

@overtrue
Copy link
Collaborator

抱歉,swoole 环境可能需要你自己去解决这些问题了,毕竟它已经不是 php 的 fpm 模式了,而这种模式下,symfony 目前没有去适配它,我个人也没有打算去适配,感谢你的反馈。

@hanwenbo
Copy link

希望您把Request的接口暴露出来,我们可以通过外部传过去,根据psr7的标准来传

@yuchonghua
Copy link

同样的问题,为什么 Request 不能使用传入,而是调用 Request::createFromGlobals();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants