Skip to content

[Notifier] [OvhCloud] Add "sender" #40377

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

Closed
wants to merge 3 commits into from
Closed

[Notifier] [OvhCloud] Add "sender" #40377

wants to merge 3 commits into from

Conversation

notFloran
Copy link
Contributor

Q A
Branch? 5.x
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR symfony/symfony-docs#... (I'm waiting to see if the feature is accepted )

Add "sender" option to the DSN that allows configuring the sender of the message.

OVHCloud manages two cases for sending sms according to the doc:

The senderForResponse parameter will allow the use of a short number, which allows you to send SMS directly without having to create an alphanumeric sender (for example: your name).
Short numbers also allow you to receive responses from the recipients of your SMS, which can be useful for a satisfaction survey, a voting application, a game, etc.

CleanShot 2021-03-05 at 13 26 33

This PR introduces the management of these 2 cases with a new option sender:

  • if sender is set, we use it
  • if sender is not set, we use senderForResponse to get a short number (current behavior)

I took the logic implementedin the old official SDK : https://github.com/ovh/php-ovh-sms/blob/52d279e112a7da8f897745acab32a887321e03f1/src/Message.php#L161

Add "sender" option that allows configuring the sender of the message
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 5.x branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot carsonbot changed the title [Notifier][OvhCloud] Add "sender" [Notifier] [OvhCloud] Add "sender" Mar 5, 2021
Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my comments

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afterwards good to go 👍🏻

@fabpot
Copy link
Member

fabpot commented Mar 6, 2021

Thank you @notFloran.

fabpot added a commit that referenced this pull request Mar 6, 2021
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [OvhCloud] Add "sender"

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features --> (I'm waiting to see if the feature is accepted )

Add "sender" option to the DSN that allows configuring the sender of the message.

OVHCloud manages two cases for sending sms according to the [doc](https://docs.ovh.com/fr/sms/envoyer_des_sms_avec_lapi_ovh_en_php/):

> The senderForResponse parameter will allow the use of a short number, which allows you to send SMS directly without having to create an alphanumeric sender (for example: your name).
> Short numbers also allow you to receive responses from the recipients of your SMS, which can be useful for a satisfaction survey, a voting application, a game, etc.

![CleanShot 2021-03-05 at 13 26 33](https://user-images.githubusercontent.com/523981/110115554-84c5af80-7db6-11eb-815d-7e8bafa81e5d.png)

This PR introduces the management of these 2 cases with a new option `sender`:
* if `sender` is set, we use it
* if `sender` is not set, we use `senderForResponse` to get a short number (current behavior)

I took the logic implementedin the old official SDK : https://github.com/ovh/php-ovh-sms/blob/52d279e112a7da8f897745acab32a887321e03f1/src/Message.php#L161

Commits
-------

c5a9b25 [Notifier] [OvhCloud] Add "sender"
@fabpot fabpot closed this Mar 7, 2021
@fabpot fabpot mentioned this pull request Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants