akki-team / sylius-messenger-plugin
Installs: 1 546
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Open Issues: 1
Type:sylius-plugin
pkg:composer/akki-team/sylius-messenger-plugin
Requires
- php: >=8.1
- akki-team/sylius-settable-channel-plugin: ^1.0
- akki-team/sylius-settable-locale-plugin: ^1.0
- sylius/sylius: ^1.11 || ^1.12 || ^1.13 || ^1.14
README
Overview
This plugin works with symfony/messenger and Sylius.
With two new stamps (LocaleStamp and ChannelStamp) you can set the locale and channel context directly in your message.
The context will be automatically set when the message will be consumed.
Installation
- Install the plugin to your project with the following command:
$ composer require akki-team/sylius-messenger-plugin
- After the installation, check that the plugin is correctly declared in your project in the file
config/bundles.php.
return [ ... Akki\SyliusMessengerPlugin\AkkiSyliusMessengerPlugin::class => ['all' => true], ];
Example
use Akki\SyliusMessengerPlugin\Stamp\ChannelStamp; use Akki\SyliusMessengerPlugin\Stamp\LocaleStamp; $envelope = new Envelope(new MyMessage(), [ new LocaleStamp('en_US'), new ChannelStamp('web'), ]); $this->bus->dispatch($envelope);