Closed addgod closed 1 year ago
They definitely should be firing (and do for me on our usage of this driver).
Eloquent Entry inherits from the file-based Entry which is where all the event firing takes place.
Can you share some code to show what you're doing, or provide a sample repo with the issue so I can look into it further?
protected $listen = [
EntrySaving::class => [
EntrySavingListener::class,
],
EntrySaved::class => [
EventSavedListener::class,
],
];
Here the EntrySavedListener is fired, but the EntrySavingListener did not fire.
I just tested in on one of our sites using the driver and it worked fine for me so it does seem to be something specific to your setup.
If you can provide full code showing what you're doing I'll take a further look.
To share the whole thing I cannot since it is for a customer, and it is a fairly large project.
But I basically just do the above, and then dd in the handle function in the listener to see if it gets to it. Ill add some event debugging and see what happens.
The only thing I can think of that might make a difference, is that this happens in a Statamic addon. And I am using the listen property inside its service provider.
Ahh ffs, I have the problem, i'll close the issue. Someone else fucked up other places in the code.
When saving an entry, then it seems that the EntrySaving event is not dispatched.
From what I can see in the code, the EntryCreated, EntryDeleted and EntrySaved does not seem to be dispatched either.