Similarly to the hook cleanup in #2709473: Clarify the difference between sms_incoming operations

  • Remove the $op param from existing process hooks, and separate into different hooks. Rename hooks so they are in line/opposite-of incoming hooks?
  • Document the hooks in sms.api.php
  • Clean up or standardise protected methods:
    1. merge into provider::send(): Merge provider::process, provider::preproces, provider::postprocess into send method? Or,
    2. add send terminology: rename them so they have 'send'/'outgoing' in the name. Because incoming has mirroring functionality, but without separate hooks. Or,
    3. Add separate protected methods to incoming, to mirror existing send methods? (preProcessIncoming... etc)
Change to
hook_sms_send_process [$op => "pre process"] hook_sms_send_preprocess /or/ hook_sms_outgoing_preprocess
Is hook_sms_send required? ?
hook_sms_send_process [$op => "post process"] hook_sms_send_postprocess /or/ hook_sms_outgoing_postprocess

Comments

dpi created an issue. See original summary.

dpi’s picture

Issue summary: View changes
dpi’s picture

Issue summary: View changes
dpi’s picture

Issue summary: View changes
dpi’s picture

Issue summary: View changes
dpi’s picture

Issue tags: +beta blocker

Tagging

API modification, schema change.

Feature required for 1.0

almaudoh’s picture

IMO hook_sms_outgoing_preprocess, hook_sms_outgoing_postprocess, hook_sms_incoming_preprocess and hook_sms_incoming_postprocess are more descriptive

dpi’s picture

+1 I agree

dpi’s picture

I've included some of the changes discussed in this issue in #2643408: Implement a more intelligent SMS Gateway selection mechanism for SMS Framework #12

almaudoh’s picture

Let's pull the changes back from #2643408: Implement a more intelligent SMS Gateway selection mechanism for SMS Framework into a separate patch here.

dpi’s picture

OP is complete, some modifications made in #2643408: Implement a more intelligent SMS Gateway selection mechanism for SMS Framework.

Remaining tasks:

  • Document the hooks in sms.api.php

...but perhaps change hooks to events.. #2786865: Replacing hooks with Symfony events

almaudoh’s picture

Well, if we're going for Events, we might as well just do that, and close this one.

dpi’s picture

Status: Active » Fixed

The events will need to be documented as well, so closing this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.