gpt4 book ai didi

laravel-5 - 不能使用 'PhpParser\Node\Scalar\String' 作为类名,因为它是保留的

转载 作者:行者123 更新时间:2023-12-04 21:56:31 25 4
gpt4 key购买 nike

当我使用 Composer 安装 Laravel 5 时,出现此错误:

Cannot use 'PhpParser\Node\Scalar\String' as class name as it is reserved in /Applications/XAMPP/xamppfiles/htdocs/learnlaravel5/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php on line 86



Image of the error here

怎么了?

最佳答案

我假设您使用的是 PHP7,否则您不会收到此错误 (?)。

在 PHP7 中 String现在是与 some others 一起的保留关键字. PHP-Parser 库使用了这个关键字,但从 fixed in April 2015 开始.尝试升级 PHP-Parser 库,这应该会有所帮助。

关于laravel-5 - 不能使用 'PhpParser\Node\Scalar\String' 作为类名,因为它是保留的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34200096/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com