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

Log 冲突 #45

Open
JoeByte opened this issue May 25, 2023 · 1 comment
Open

Log 冲突 #45

JoeByte opened this issue May 25, 2023 · 1 comment

Comments

@JoeByte
Copy link

JoeByte commented May 25, 2023

Fatal error: Cannot declare class Log, because the name is already in use in /data/app/vendor/alibabacloud/aliyun-log-php-sdk/Aliyun/Log/sls.proto.php on line 129

本身你就是一个组件,你还不用命名空间
不用命名空间也行,你用长一点的命名呗,偏不!!!!!!

实测与 lumen 框架冲突
lumen ./bootstrap/app.php 里面
$app->withFacades(); 方法调用了 vendor/laravel/lumen-framework/src/Application.php
这里面定义了很多类的别名 ,导致 Log 冲突

解决方法 修改 ./bootstrap/app.php
别名指向空字符串

$app->withFacades(true, [
    \Illuminate\Support\Facades\Log::class => '',
]);
@xueguang666
Copy link

这代码写的,咋地也应该有一个命名空间啊,不然不是各种冲突,找的是新手写的吧

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