Commit 28b1709
committed
bug symfony#58242 [Notifier][TurboSMS] Process partial accepted response from transport (ZhukV)
This PR was squashed before being merged into the 6.4 branch.
Discussion
----------
[Notifier][TurboSMS] Process partial accepted response from transport
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | None
| License | MIT
TurboSMS can return `null` as message id, if sms not sent to recipient. Example:
```json
{
"response_code": 802,
"response_status": "SUCCESS_MESSAGE_PARTIAL_ACCEPTED",
"response_result": [
{
"phone": "recipient_1",
"response_code": 406,
"message_id": null,
"response_status": "NOT_ALLOWED_RECIPIENT_COUNTRY"
},
{
"phone": "recipient_2",
"response_code": 0,
"message_id": "f83f8868-5e46-c6cf-e4fb-615e5a293754",
"response_status": "OK"
}
]
}
```
And we receive error:
```
Symfony\Component\Notifier\Message\SentMessage::setMessageId(): Argument symfony#1 ($id) must be of type string, null given, called in /code/vendor/symfony/turbo-sms-notifier/TurboSmsTransport.php on line 93
```
Symfony use only one phone number for sent, as result we check only first `response_result`.
Commits
-------
932dbe3 [Notifier][TurboSMS] Process partial accepted response from transportFile tree
2 files changed
+44
-1
lines changed- src/Symfony/Component/Notifier/Bridge/TurboSms
- Tests
2 files changed
+44
-1
lines changedLines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
96 | 133 | | |
97 | 134 | | |
98 | 135 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
92 | 98 | | |
93 | | - | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
0 commit comments