Create a Notifier Transport in Symfony

1- Create the Transport class

2- Configure the chatter and create the Transport Factory

# notifier.yaml
framework:
notifier:
chatter_transports:
userland: '%env(USERLAND_DSN)'
# .env
USERLAND_DSN:userland://TOKEN@default?channel=CHANNEL

3- Register the factory

# services.yamlApp\UserlandTransport\UserlandTransportFactory:
parent: notifier.transport_factory.abstract
tags: ['chatter.transport_factory']

4- Try it 🚀

  • SendMessageEvent
  • SentMessageEvent
  • FailedMessageEvent

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Smaine Milianni

Smaine Milianni

428 Followers

Fullstack Developer- certified Symfony 4,5 and certified AWS Solution Architect - Freelancer - Remote Worker