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

[0.9.0] 复合表达式在我的 PHP 5.6 上不工作 #37

Closed
ghost opened this issue May 8, 2018 · 3 comments
Closed

[0.9.0] 复合表达式在我的 PHP 5.6 上不工作 #37

ghost opened this issue May 8, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented May 8, 2018

您好!
我很欣喜的发现在新的 0.9.0 版本介绍中表示应用仍支持 PHP 5.6。
可是当我更新后运行时却得到了一个错误在 PHP 5.6:

PHP Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM) in /path/to/BilibiliHelper/index.php on line 16:

$config = $app->get('config')::parse('config');

经过测试,应用程序在 PHP 7.2 工作的很好。
这种由复合表达式造成的错误在 PHP 5.6 上我曾经遇到过。
我当时的处理方法是进行语句拆分。
这次我进行了尝试,但发现关联很多工程量较大。
请问这是 PHP 环境版本造成的问题吗?还是其他问题?
十分感谢!

@metowolf
Copy link
Owner

metowolf commented May 8, 2018

目前开发环境为 PHP7.1,确实没有对 5.x 进行兼容检查,后续会进行处理,不过仍然建议升级到 7.1 版本以上。

(目前使用的一个库的最新版本已经要求 >=7.1 🌚

@ghost
Copy link
Author

ghost commented May 8, 2018

哈哈,了解,省事的办法就是改一下 README.md/composer
;p

@ghost ghost closed this as completed May 9, 2018
@metowolf
Copy link
Owner

metowolf commented May 9, 2018

目前已经修复

This issue was closed.
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

1 participant