4cc605537f
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 https://github.com/symfony/symfony-docs/pull/13025#pullrequestreview-352447344
| 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
-------
|
||
---|---|---|
.. | ||
DebugBundle | ||
FrameworkBundle | ||
SecurityBundle | ||
TwigBundle | ||
WebProfilerBundle | ||
FullStack.php |