Skip to content

SteppingHat/symfony-d7-notifier

Repository files navigation

Symfony D7 Networks Notifier

Latest Stable Version Total Downloads License Build Status

Provides D7 Networks integration for Symfony Notifier.

Installation

Install this package using composer

composer require steppinghat/symfony-d7-notifier

Add the D7 transport in config/pakages/notifier.yaml

framework:
    notifier:
        texter_transports:
            d7: '%env(D7_DSN)%' # ADD MEE!

Define the D7 DSN environment variable in .env

D7_DSN=d7://<TOKEN>@default?<PARAMETERS>

TOKEN is your D7 Networks API token and PARAMETERS is a query string that is built with the following parameters:

Parameter Type Description
from string The sender number or alphanumeric name.
defaultLocale string The two-letter country code to convert local numbers to international numbers.
allowUnicode bool Allow messages to be encoded and sent using unicode if UTF-8 characters are present. Optional, defaults to true.

A typical example DSN would be:

D7_DSN=d7://abcd1234@default?from=SteppingHat&defaultLocale=AU

and lastly register the service in services.yaml

notifier.transport_factory.d7:
    class: SteppingHat\D7Notifier\D7TransportFactory
    parent: notifier.transport_factory.abstract
    tags: [texter.transport_factory]

Contributing

Tests

Included for library development purposes is a small set of test cases to assure that basic library functions work as expected. These tests can be launched by running the following:

$ vendor/bin/phpunit

License

Made with ❤ by Javan Eskander

Available for use under the MIT license

About

Provides D7 networks SMS integration for Symfony Notifier

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages