Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Twilio Notifier

Twilio Notifier Laravel Package

symfony/twilio-notifier

Send SMS messages via Twilio from your Symfony app with the Twilio Notifier bridge. Configure it using a simple DSN (twilio://SID:TOKEN@default?from=FROM) and attach extra options like webhook URLs to individual messages through the TwilioOptions class.

View on GitHub
Deep Wiki
Context7

Symfony Twilio Notifier integrates Twilio SMS delivery into Symfony’s Notifier component. Configure it with a twilio://SID:TOKEN@default?from=FROM DSN and send SmsMessage instances through the notifier transport.

Use TwilioOptions to attach message-specific settings, such as a webhook URL, before sending.

  • Sends SMS via Twilio from Symfony Notifier
  • Simple DSN-based configuration
  • Supports per-message TwilioOptions
  • Extensible message option handling
  • Part of the Symfony ecosystem
Frequently asked questions about Twilio Notifier
What is symfony/twilio-notifier used for?
It is the Symfony Notifier bridge for sending SMS through Twilio. You configure a twilio:// DSN and send SmsMessage objects through the Symfony texter. TwilioOptions lets you attach per-message settings such as a webhook URL. It is not a Laravel package, so Laravel apps need an adapter or a different integration path.
Can I use symfony/twilio-notifier in a Laravel application?
Not directly as a Laravel notification channel, because it is built for Symfony Notifier. You can install symfony/notifier and this bridge as standalone libraries, then wrap the transport in a Laravel service or facade. Most Laravel teams should compare it with Laravel's native Twilio notification channel or twilio/sdk before adding the Symfony abstraction.
How do I install symfony/twilio-notifier with Composer?
Run composer require symfony/twilio-notifier, and Composer will pull in symfony/notifier and related dependencies. In a Laravel app you would also need to bootstrap the Symfony Notifier texter yourself or through an adapter. There is no Laravel service provider or config file shipped by this package.
What does the TWILIO_DSN format look like?
The DSN is twilio://SID:TOKEN@default?from=FROM, where SID is your Twilio account SID, TOKEN is your auth token, and FROM is the sender number. In Laravel you can store it in .env and read it with env('TWILIO_DSN'). Keep the DSN secret out of source control and be careful with config caching.
How do I add a webhook URL or other options to a Twilio message?
Create a SmsMessage, build a TwilioOptions instance, call webhookUrl('...') and any other supported option, then attach it with $sms->options($options). Send the message through the Symfony texter. In Laravel you would need to translate this into your own notification or service API.
Does symfony/twilio-notifier work with Laravel notifications?
No, it does not register a Laravel notification channel. Laravel notifications expect channel and message classes that implement Laravel contracts, while this bridge returns Symfony Notifier objects. You can build an adapter that maps Laravel notifications to SmsMessage and TwilioOptions, but that is custom code you own.
How should I test Twilio SMS sending in Laravel if I use this bridge?
Symfony's TransportTestCase is not designed for Laravel's test helpers, so use Laravel's HTTP client fakes or mock the Twilio HTTP calls instead. Isolate the Symfony texter behind an interface and fake that interface in feature tests. Also add a webhook test that asserts empty secrets are rejected after the v8.1.7 change.
What changed in symfony/twilio-notifier v8.1.7 for production?
The tracked stable release moved from v8.1.0-BETA3 to v8.1.7, which includes a bugfix rejecting an empty secret in the Twilio webhook parser. That is security hardening for inbound webhooks, not an API change. Production and CI environments must now provide a non-empty TWILIO_WEBHOOK_SECRET or equivalent, or webhook parsing will hard fail.
What are the alternatives to symfony/twilio-notifier for Laravel?
Use Laravel's native notification system with a Twilio channel, the official twilio/sdk directly, or a community package such as laravel-notification-channels/twilio. This Symfony bridge makes sense only if you already use Symfony Notifier or want its transport abstraction. Otherwise the extra abstraction layer is usually not worth the integration cost in Laravel.
Is symfony/twilio-notifier actively maintained and which PHP or Laravel versions does it support?
It is maintained as part of the Symfony monorepo and follows Symfony's release cycle, with the stable v8.1.7 patch line tracked here. It targets Symfony Notifier and Symfony's PHP version requirements, not Laravel versions. Check the Symfony 8.1 requirements for PHP compatibility and re-baseline any Laravel adapter against the stable tag rather than a beta.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log