-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Notifier] Added ability to initialize sms options #39774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Notifier] Added ability to initialize sms options #39774
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth added a settter too?
Can you add a test case please? |
56e5dde
to
e79bf22
Compare
Added |
Sure, added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth added a settter too?
Can you share the use case? I did not implemented options for SMS, as there is no need. The only method in the interface is |
I implemented telnyx transport for sending sms messages(#38909), telnyx provides the ability to set extra fields for example webhook url, media links and etc, and without the chages not possible to use the options in transport because getOptions method always will return null.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, afterwards good to go
src/Symfony/Component/Notifier/Tests/Message/SmsMessageTest.php
Outdated
Show resolved
Hide resolved
e79bf22
to
fbb901f
Compare
👎 We don't want to code specific features for each provider. The goal of the component is to implement the common features of all providers. |
But isn't this the base to have a common way to implement specific options for specific Texters? I mean otherwise we need to blow up the telnyx transport and others and find another way which is completely different to the chat messages? 🧐 |
@fabpot can you please answer my question? Thanks 😊 |
Again, the whole idea is to be able to switch one implementation with another one. That's very true with SMS and email, less with chat as there is no real interoperability (yet?). But SMS and emails are pretty standard. |
Ok let's close here. @krasilnikovm can you please update your implementation And just use the standard way without additional options ? Thanks |
During implementing notifier transport were found SmsMessage::getOptions method always returns null and there is no ability to set sms options.
In the pr added ability to initialize sms options through the constructor.