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

请问下能兼容php5.6嘛? #19

Closed
testerSunshine opened this issue Jul 26, 2019 · 6 comments
Closed

请问下能兼容php5.6嘛? #19

testerSunshine opened this issue Jul 26, 2019 · 6 comments

Comments

@testerSunshine
Copy link

用php5.6录制好的session回放不了,midi能支持到5.6嘛?
image

@MingliangT
Copy link
Member

看错误是在 null 上调用方法导致报错的吧

@testerSunshine
Copy link
Author

image
这个是php5.6的语法,在php7上面执行不了
确实最后的报错是在redis的实例上,不知道会不会是上面那个报错导致的

@MingliangT
Copy link
Member

这是你代码的问题,在 php7 环境下使用 __autoload。

midi 使用 composer 自动加载,不存在 __autoload 调用。

@testerSunshine
Copy link
Author

testerSunshine commented Jul 26, 2019

其实不是我想在7环境下使用autoload,midi只有在php7版本可以用,然后我就在7上面试着运行了下,但是我们的php版本是5,所以问问大佬,能不能出个兼容5的版本

@MingliangT
Copy link
Member

运行 midi 可以用 php7,跑你的代码可以用 php5.6。

试一下在项目目录下 .midi/config.yml 中指定 php 二进制路径:

php:
    bin: /path/to/php5.6/bin/php

更多细节见 https://github.com/didi/rdebug/blob/master/doc/midi/Config.md

@testerSunshine
Copy link
Author

收到,我去试试

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

2 participants