A notification Blueprint that omits getFromUser() fails at send time rather than at registration, so the extension installs and enables cleanly and only breaks when the notification actually fires.
The required surface
public function getFromUser(): ?User
{
return $this->actor; // may be null for system notifications
}
public function getSubject() { return $this->thing; }
public function getAttributes() { return ['thingId' => $this->thing->id]; }
public static function getType() { return 'myThing'; }
public static function getSubjectModel() { return Thing::class; }
Returning null is fine and is the right answer for a notification not attributable to a person. Omitting the method entirely is not.
Recommended Comments