Open TKr opened 2 years ago
Hi @TKr, sorry for the issue. Can you help me reproduce? Can you please write which libraries are you installing and their versions? Maybe try attaching your composer.json
redacting anything that you don't want to share…?
I show this on php7.4 and laravel 6.X (but wersion do not matter in this case)
PHP Error: Call to undefined method Event::dispatch() in Psy Shell code on line 1
should return
TypeError: Too few arguments to function Illuminate\Events\Dispatcher::dispatch(), 0 passed in ....
=> []
should return
=> [ "Illuminate\Support\Facades\Facade" => "Illuminate\Support\Facades\Facade", ]
Instead of returning Laravel Facade Event class comes from extension https://www.php.net/manual/en/class.event.php I know. Facade is "invented" for laravel and good practice is to not use them. But unfortunately there is many projects which use it that way.
Example 2: event package removed from Dockerfile (mine local build):
Event comes from Laravel as expected
I don know is this a bug, which should be fixed, and event
extension removed. I just noticing that some frameworks with event
enabled my not working correctly.
Bug ? Notice ?
pecl-event registers class Event::class laravel has own "Facade" system and register Event as
Illuminate\Support\Facades\Event::class
but can not, pecl-event has already done thisLaravel's
Event::dispatch(something)
ends with error.