-
-
Notifications
You must be signed in to change notification settings - Fork 741
Description
Describe the bug
When using the pipe introduced in v4, we can remove changes.
The check to see if we should log even when empty changes is done prior to the pipe call.
To Reproduce
Add a pipe that removes all changes.
set LogOptions to only NOT log when empty changes.
Expected behavior
No log entries should be created.
Versions (please complete the following information)
latest laravel-activitylog
Additional context
I am using spatie/laravel-data model cast.
The dirty comparison in activitylog is crude (using spaceship <=> operator to compare) so my model field is always dirty.
I am using a pipe to do a manual dirty checkup, but if that field was the only dirty field, I still get an entry in the activity table since the log options have been handled previously.