$changedFields Best-effort names of the fields possibly * written (see class doc); not authoritative. * @param string|null $legacyHook TEMPORARY (migration window): the emitting method name — * pass __FUNCTION__ — used to rebuild the historical string * name for legacy string-based listeners. */ public function __construct( public readonly int $canvasItemId, public readonly array $changedFields = [], private readonly ?string $legacyHook = null, ) {} /** * The exact historical string name of the emitting site. Remove with the migration window. * * @return array */ public function legacyHooks(): array { if ($this->legacyHook === null) { return []; } return ['leantime.domain.blueprints.services.blueprints.'.$this->legacyHook.'.canvas_item_updated']; } }