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

undefined method Illuminate\Events\Dispatcher::fire() #48

Closed
alexcagliari87 opened this issue Mar 30, 2019 · 6 comments
Closed

undefined method Illuminate\Events\Dispatcher::fire() #48

alexcagliari87 opened this issue Mar 30, 2019 · 6 comments

Comments

@alexcagliari87
Copy link

alexcagliari87 commented Mar 30, 2019

Hi,
when i try this code:

$user = Auth::user();
        
$plan = Plan::where('name','Test')->first();
        
$user->newSubscription('lorem ipsum', $plan)->create();

i get an exception:

Call to undefined method Illuminate\Events\Dispatcher::fire() {"userId":1,"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined method Illuminate\Events\Dispatcher::fire() at /var/www/html/xxx/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:237) ...........

What can we do to solve this problem? Is fire a deprecated method?
I'm using laravel 5.8.
Thanks

@Yahav
Copy link

Yahav commented Apr 25, 2019

The 'fire' Method
The fire method (which was deprecated in Laravel 5.4) of the Illuminate/Events/Dispatcher class has been removed. You should use the dispatch method instead.

@rifan75
Copy link
Contributor

rifan75 commented May 25, 2019

just change file src\Laraplans\Models\PlanSubscription.php line 87, Event::fire to Event:dispatch.
I already aplly pull request about this issue

@siarheipashkevich
Copy link

Any updates?

@samtoya
Copy link

samtoya commented Aug 30, 2019

Any updates on this please? I need to deploy my application to production and it relies on this package.

Thanks guys.

@siarheipashkevich
Copy link

@gerardojbaez any updates?

@gerardojbaez
Copy link
Owner

I've just released v3.0.0 which addresses this issue, along with support for L5.8. Feel free to open a new issue should anyone have any issues.

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

6 participants