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

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

Open
adeiming opened this issue Aug 13, 2020 · 1 comment
Open

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

adeiming opened this issue Aug 13, 2020 · 1 comment

Comments

@adeiming
Copy link

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 added a commit to patrickcurl/revisionable that referenced this issue Dec 27, 2020
Namespace fix, causing errors in laravel with php 7.4. 
E.G: Call to undefined method Event::dispatch(), explicitly namespacing the classes and removing backslash, fixes the bug.

See: VentureCraft#376
@patrickcurl
Copy link

patrickcurl commented Dec 27, 2020

@adeiming Namespacing the classes referenced fixed this for me.
see: #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.

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

2 participants