sol-parts/symfony-smsclub-notifier

Symfony SmsClub Notifier Bridge

Maintainers

Package info

github.com/sol-parts/symfony-smsclub-notifier

Homepage

Type:symfony-notifier-bridge

pkg:composer/sol-parts/symfony-smsclub-notifier

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

7.3.3 2026-08-16 19:45 UTC

This package is auto-updated.

Last update: 2026-08-16 19:48:52 UTC


README

Provides SmsClub integration for Symfony Notifier. The transport supports sending SMS messages, reading the SmsClub response from the resulting SentMessage, and checking the account balance.

Installation

composer require sol-parts/symfony-smsclub-notifier

Standalone usage

The transport can be used without the Symfony Full Stack Framework:

use SolParts\SymfonySmsClubNotifier\SmsClubTransport;
use Symfony\Component\Notifier\Message\SmsMessage;

$transport = new SmsClubTransport('auth-token', 'InfoCenter');
$message = new SmsMessage('380931234567', 'Your order has been shipped.');

$sentMessage = $transport->send($message);

dump($sentMessage->getMessageId());
// '1241725993'

dump($sentMessage->getInfo());
// [
//     'success_request' => [
//         'info' => [
//             '1241725993' => '380931234567',
//         ],
//     ],
// ]

Checking the balance

$balance = $transport->balance();

dump($balance);
// '8121.1800 UAH'

Symfony Full Stack Framework

Add the SmsClub DSN to your environment:

# .env.local
SMSCLUB_DSN=smsclub://TOKEN@default?from=FROM

Register the transport factory:

# config/services.yaml
services:
    SolParts\SymfonySmsClubNotifier\SmsClubTransportFactory:
        autowire: true
        tags: ['texter.transport_factory']

Configure the texter transport:

# config/packages/notifier.yaml
framework:
    notifier:
        texter_transports:
            smsclub: '%env(SMSCLUB_DSN)%'

Where:

  • TOKEN is your SmsClub API token;
  • FROM is your registered alphanumeric sender name.

URL-encode the token and sender name if they contain characters reserved in a URI.

Inject Symfony's TexterInterface to send a message:

use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\TexterInterface;

final class OrderNotifier
{
    public function __construct(
        private readonly TexterInterface $texter,
    ) {
    }

    public function sendShippingNotice(string $phone): void
    {
        $this->texter->send(new SmsMessage(
            $phone,
            'Your order has been shipped.',
        ));
    }
}

Resources