This repository is archived and no longer maintained.
Symfony now provides official Plivo support via the Symfony Notifier component, which fully replaces this package.
👉 Please use the official package instead: https://github.com/symfony/plivo-notifier
Reasons for archiving:
- Official Symfony support is actively maintained
- Better long-term compatibility with Symfony versions
- Security fixes and new features are handled upstream
This repository remains available for historical reference only.
Provides Plivo integration for Symfony Notifier.
- Install package using composer
composer require rentbetter/plivo-notifier@^6.1- Add your Plivo DSN to your environment variables, e.g. in
.env
PLIVO_DSN=plivo://AUTH_ID:AUTH_TOKEN@default?from=FROM
- Register the
PlivoTransportFactoryin yourservices.yaml
notifier.transport_factory.plivo:
class: Symfony\Component\Notifier\Bridge\Plivo\PlivoTransportFactory
parent: notifier.transport_factory.abstract
tags: ['texter.transport_factory']- Enable the Plivo transport in your
config/packages/notifier.yamlconfiguration
framework:
notifier:
texter_transports:
plivo: '%env(PLIVO_DSN)%'- Start sending SMS in your application, see the symfony docs
PLIVO_DSN=plivo://AUTH_ID:AUTH_TOKEN@default?from=FROM&statusUrl=URL&statusUrlMethod=METHOD
where:
AUTH_IDis your Plivo auth IDAUTH_TOKENis your Plivo auth tokenFROMis your senderURL(optional) is the URL to which Plivo should send delivery updatesMETHOD(optional) is the HTTP method (GET, POST) with which Plivo should callURL