hootlex / laravel-friendships

This package gives Eloquent models the ability to manage their friendships.
MIT License
706 stars 151 forks source link

Replace usage of deprecated Illuminate\Events\Dispatcher::fire() #142

Open jwittekind opened 4 years ago

jwittekind commented 4 years ago

I'm always getting an error when trying to seed my database causd be the method $user->befriend($arg);

My research has shown that this method is outdated. My updates did not help me to get rid of this error. Will it be fixed?

` Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined method Illuminate\Events\Dispatcher::fire()

at /var/www/my-api/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:239 235| if (! $instance) { 236| throw new RuntimeException('A facade root has not been set.'); 237| } 238|

239| return $instance->$method(...$args); 240| } 241| } 242|

Exception trace:

1 Illuminate\Support\Facades\Facade::__callStatic("fire") /var/www/my-api/vendor/hootlex/laravel-friendships/src/Traits/Friendable.php:35

2 App\User::befriend(Object(App\User)) /var/www/my-api/database/seeds/UserTableSeeder.php:56

Please use the argument -v to see more details.

Whoops\Exception\ErrorException : Module 'sqlite3' already loaded

at Unknown:0 1|

Exception trace:

1 Whoops\Run::handleError("Module 'sqlite3' already loaded", "Unknown") /var/www/my-api/vendor/filp/whoops/src/Whoops/Run.php:408

2 Whoops\Run::handleShutdown()

`

mrandibilbao commented 4 years ago

Same here, pls fix it. Really love your package. Thanks

atix9000 commented 4 years ago

same here

Aujicini commented 4 years ago

Sorry, this seems to be unmaintained. Please goto https://github.com/demency/laravel-friendships/issues.

sloan58 commented 3 years ago

I just submitted a PR for this. Hopefully it's sufficient and will be merged.