Skip to content

Instantly share code, notes, and snippets.

View nikophil's full-sized avatar

Nicolas PHILIPPE nikophil

View GitHub Profile
<?php
namespace App\Whatever;
use Monolog\Handler\HandlerInterface;
use Monolog\Logger;
use Symfony\Bridge\Monolog\Handler\ConsoleHandler;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
messenger:
# these 3 confs are mutually exclusive! cannot use them together
transports:
normal_transport:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%/some_exchange_1'
# if not provided at all: defaults to `messenger.serializer.default_serializer`
# can be used with the short notation: works the same way as now
serializer: transport_serializer_service_id
# or as an array, everything is optional: if "service_id" not provided if it uses `messenger.serializer.default_serializer`