Commit d02e28d
committed
feature #35690 [Notifier] Add Free Mobile notifier (noniagriconomie)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Notifier] Add Free Mobile notifier
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Implements symfony/symfony-docs#13025 (review)
| License | MIT
| Doc PR | Will document if accepted (see **Usage** below)
## Add a new notifier (SMS) with the French Free Mobile provider.
It is a **special notifier** as it **only send the SMS to the self user**,
but I think it can be **useful for notification alerting purposes** (the way I use it already, and plan to use it with the component)
---
**Provider doc:** (🇫🇷 sorry)
https://mobile.free.fr/moncompte/index.php?page=options
<img width="716" alt="1" src="https://user-images.githubusercontent.com/13205768/74357784-b55c3500-4dc0-11ea-95ba-19ded062e800.png">
<img width="431" alt="2" src="https://user-images.githubusercontent.com/13205768/74357786-b7be8f00-4dc0-11ea-837e-b922c20e9a2e.png">
---
**Usage:**
```
// .env file
FREEMOBILE_DSN=freemobile://LOGIN:PASSWORD@default?phone=PHONE
```
where:
- `LOGIN` is your Free Mobile login
- `PASSWORD` is the token displayed in the config panel
- `PHONE` is your Free Mobile phone number
```yaml
// config/packages/notifiers.yaml file
framework:
notifier:
texter_transports:
freemobile: '%env(FREEMOBILE_DSN)%'
```
Then you can then use it like documented here https://symfony.com/doc/current/notifier/texters.html
ℹ️ As this is a special notifier, the `PHONE` provided inside the DSN mut be the same used [here](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Notifier/Message/SmsMessage.php#L31) for `$phone` value
---
Voilà!
Commits
-------
1b8709ee72 Add Free Mobile notifier2 files changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
0 commit comments