VentureCraft / revisionable

Easily create a revision history for any laravel model
http://twitter.com/duellsy
MIT License
2.55k stars 348 forks source link

Event::dispatch error when event extension enabled in php7.3-fpm #376

Open adeiming opened 4 years ago

adeiming commented 4 years ago

this problem occurs when i enable event extension in php 7.3-fpm. the error that appears is:

Call to undefined method Event::dispatch()

Please help.

patrickcurl commented 3 years ago

@adeiming Namespacing the classes referenced fixed this for me. see: https://github.com/VentureCraft/revisionable/pull/386

You could just copy that to App\Traits\RevisionableTrait and reference that instead of the one in vendors, and it should work until the PR is instituted. I believe php 7.3 has it's own Event class so \Event is referencing that not Illuminate\Support\Facades\Event, for good measure I just namespaced Revisionable, DB, and Event classes.