Lumen5.5 PHP7.1-Event class_alisa()冲突


环境:
Mac OS 10.12
Brew
PHP7.1
PHP7.1-Event
Lumen5.5

启用event.so后,php artisan会报错,错误信息为:
Warning: Cannot declare class Event, because the name is already in use

不启用event就没事,冲突代码在vendor/laravel/lumen-framework/src/Application.php 652行 withAliases(),这里为'Illuminate\Support\Facades\Event'定义了别名'Event'.
这算是官方代码的bug吧?有人之前有遇到过吗?

日志:
[2017-09-21 08:59:23] lumen.ERROR: ErrorException: Cannot declare class Event, because the name is already in use in /usr/local/var/www/lumen/vendor/laravel/lumen-framework/src/Application.php:673
Stack trace:
#0 [internal function]: Laravel\Lumen\Application->Laravel\Lumen\Concerns{closure}(2, 'Cannot declare ...', '/usr/local/var/...', 673, Array)
#1 /usr/local/var/www/lumen/vendor/laravel/lumen-framework/src/Application.php(673): class_alias('Illuminate\Supp...', 'Event')
#2 /usr/local/var/www/lumen/vendor/laravel/lumen-framework/src/Application.php(642): Laravel\Lumen\Application->withAliases(Array)
#3 /usr/local/var/www/lumen/vendor/laravel/lumen-framework/src/Application.php(780): Laravel\Lumen\Application->withFacades(true)
#4 /usr/local/var/www/lumen/vendor/laravel/lumen-framework/src/Console/Kernel.php(55): Laravel\Lumen\Application->prepareForConsoleCommand(true)
#5 [internal function]: Laravel\Lumen\Console\Kernel->__construct(Object(Laravel\Lumen\Application))
#6 /usr/local/var/www/lumen/vendor/illuminate/container/Container.php(785): ReflectionClass->newInstanceArgs(Array)
#7 /usr/local/var/www/lumen/vendor/illuminate/container/Container.php(631): Illuminate\Container\Container->build('App\Console\Ker...')
#8 /usr/local/var/www/lumen/vendor/illuminate/container/Container.php(586): Illuminate\Container\Container->resolve('App\Console\Ker...', Array)
#9 /usr/local/var/www/lumen/vendor/laravel/lumen-framework/src/Application.php(230): Illuminate\Container\Container->make('App\Console\Ker...', Array)
#10 /usr/local/var/www/lumen/vendor/illuminate/container/Container.php(256): Laravel\Lumen\Application->make('App\Console\Ker...', Array)
#11 /usr/local/var/www/lumen/vendor/illuminate/container/Container.php(749): Illuminate\Container\Container->Illuminate\Container{closure}(Object(Laravel\Lumen\Application), Array)
#12 /usr/local/var/www/lumen/vendor/illuminate/container/Container.php(631): Illuminate\Container\Container->build(Object(Closure))
#13 /usr/local/var/www/lumen/vendor/illuminate/container/Container.php(586): Illuminate\Container\Container->resolve('Illuminate\Cont...', Array)
#14 /usr/local/var/www/lumen/vendor/laravel/lumen-framework/src/Application.php(230): Illuminate\Container\Container->make('Illuminate\Cont...', Array)
#15 /usr/local/var/www/lumen/artisan(32): Laravel\Lumen\Application->make('Illuminate\Cont...')
#16 {main}


Vote Vote Cancel Collect Collect Cancel

<< 上一篇: 路由

>> 下一篇: lv5.5 使用repo的小问题