Problem/Motivation

Post #2509566: Convert sms_send() into a service, the SmsMessageInterface value object was created to carry information about the SMS to be sent, the sender id and the recipients. However, this interface was incomplete as the object needs a unique id (UUID) in case of serialization / storage and also the user who originated the message. $uuid already exists as a field in SmsMessage class but is neither initialized nor has an accessor method. This may be considered a bug.

Proposed resolution

Update the interface and implementation to incorporate the UUID and UID properties:

  1. add a SmsMessageInterface::getUuid() method and implement SmsMessage::getUuid()
  2. add a SmsMessageInterface::getUid() method and implement SmsMessage::getUid()

Remaining tasks

Patch
Reviews
Commit

User interface changes

None

API changes

New methods ::getUuid() and ::getUid() on SmsMessageInterface and SmsMessage

Data model changes

None

Comments

almaudoh created an issue. See original summary.

almaudoh’s picture

Issue summary: View changes

Since SmsMessage is a value object, it's better to limit dependencies, hence the uid of the author will be stored not the User object.

almaudoh’s picture

Status: Active » Needs review
StatusFileSize
new3.56 KB

Simple patch with test coverage.

almaudoh’s picture

StatusFileSize
new2.31 KB
new4.86 KB

Fixed some test fails.

The last submitted patch, 3: 2564301-3.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 4: 2564301-4.patch, failed testing.

almaudoh’s picture

Status: Needs work » Needs review
StatusFileSize
new606 bytes
new4.86 KB

Status: Needs review » Needs work

The last submitted patch, 7: 2564301-7.patch, failed testing.

The last submitted patch, 7: 2564301-7.patch, failed testing.

The last submitted patch, 7: 2564301-7.patch, failed testing.

almaudoh’s picture

almaudoh’s picture

Title: Add UUID and User properties to SmsMessageInterface » Add UUID and UID properties to SmsMessageInterface
Status: Needs work » Needs review
StatusFileSize
new869 bytes
new4.72 KB

Updated patch. Fixed the test fail.

  • almaudoh committed 58b9319 on 8.x-1.x
    Issue #2564301 by almaudoh: Add UUID and UID properties to...
almaudoh’s picture

Title: Add UUID and UID properties to SmsMessageInterface » Add UUID and UID property accessors to SmsMessageInterface
Status: Needs review » Fixed

Committed / pushed to 8.x-1.x.

Status: Fixed » Closed (fixed)

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