Summary
RelatedActivityLogSource::makeEntry() (src/Timeline/Sources/RelatedActivityLogSource.php) sets type: 'activity_log' on every entry — same value as ActivityLogSource. Users cannot filter the timeline to "only entries from related models' spatie logs" via ->ofType(['related_activity_log']).
Repro
$person->timeline()
->fromActivityLogOf(['emails'])
->ofType(['related_activity_log'])
->get();
// → empty collection (filter never matches)
Confusion
The source_priorities config has a related_activity_log key that DOES work — it sets the priority for RelatedActivityLogSource entries. So the priority axis and the entry-type axis disagree.
Recommended fix
Choose one (both are BC-breaking in different ways):
- Change
RelatedActivityLogSource to emit type='related_activity_log' — restores symmetry with the priority-key axis. Breaks any user filtering on type='activity_log' to mean "all spatie log entries."
- Drop the priority key
related_activity_log from config and accept that all spatie-log entries collide on a single "activity_log" type. Users who need to distinguish own- vs related-log entries do it via $entry->relatedModel === null.
Tracked by docs spec
Finding A2 in the upcoming docs restructure.
Summary
RelatedActivityLogSource::makeEntry()(src/Timeline/Sources/RelatedActivityLogSource.php) setstype: 'activity_log'on every entry — same value asActivityLogSource. Users cannot filter the timeline to "only entries from related models' spatie logs" via->ofType(['related_activity_log']).Repro
Confusion
The
source_prioritiesconfig has arelated_activity_logkey that DOES work — it sets the priority forRelatedActivityLogSourceentries. So the priority axis and the entry-type axis disagree.Recommended fix
Choose one (both are BC-breaking in different ways):
RelatedActivityLogSourceto emittype='related_activity_log'— restores symmetry with the priority-key axis. Breaks any user filtering ontype='activity_log'to mean "all spatie log entries."related_activity_logfrom config and accept that all spatie-log entries collide on a single "activity_log" type. Users who need to distinguish own- vs related-log entries do it via$entry->relatedModel === null.Tracked by docs spec
Finding A2 in the upcoming docs restructure.