News

The official Symfony bundle for Calisero is available

· 3 minutes read

The official Symfony bundle for Calisero is published and ready for production. Built on the PHP library, it brings SMS sending, OTP verification and delivery reports into a Symfony application through the tools you already use: configuration, autowiring, the Notifier component, events and the console.

What it includes

Configuration from environment variables. Set the API key, the default sender and the webhook under the calisero key, each value from %env(...)%. With Symfony Flex, the bundle registers itself.

Autowired client. Ask for SmsClientInterface in a constructor to send SMS and verification codes, read messages and check the account. The PHP library's services for messages, verifications, opt-outs and accounts are autowired too.

Notifier transport. Send through TexterInterface and the sms channel of notifications with the calisero:// DSN, and set Calisero's options — link shortening, validity, scheduling — on each message.

Delivery webhook with events. Import the bundle's routes and every delivery report becomes a Symfony event: sent, delivered or failed. Low credit dispatches events of its own. An optional token in the callback address turns away requests that do not carry it.

Console commands. Send a test SMS, read a message's status, check the account, send and check a verification code, straight from bin/console.

Validation constraints. PhoneE164 and SenderId check phone numbers and sender IDs in your forms and objects, with messages translated into Romanian.

Who it helps

If your application runs on Symfony and sends OTP codes, order confirmations or delivery notifications, the bundle saves you the integration layer you would otherwise write by hand: client wiring, callback handling, status events. Coming from the Laravel package, you will find the same methods and parameters.

Getting started

The bundle installs through Composer:

composer require calisero/symfony-sms

It supports Symfony 6.4, 7 and 8 on PHP 8.2 to 8.5, and every combination is tested. Its source code is public on GitHub, with examples for every feature, and the integrations page lists the current version.

The Node.js library launched the same day. Go and Python libraries are next.

Other relevant articles

All articles