Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Handle Symfony Events with Twilio SMS

Blog post from Twilio

Post Details
Company
Date Published
Author
Matthew Setter
Word Count
1,969
Language
English
Hacker News Points
-
Summary

Symfony Events are an excellent way to build richer, more flexible, and maintainable applications. In this tutorial, you'll learn how to use Symfony's EventDispatcher Component to respond to events by sending SMS messages powered by Twilio's SMS API. You'll need prior experience with PHP and Symfony, as well as a Twilio account and mobile phone number. The application will dispatch a "usage.records.retrieved" event when the sole application route is requested, which subscribers can then respond to autonomously of any other process. The subscriber class uses Twilio's SMS API to send an SMS with the total cost of sending the messages. The tutorial guides you through creating the Event and Subscriber classes, configuring the application, and testing that it works.