PHP code example of kunicmarko / jms-messenger-adapter
1. Go to this page and download the library: Download kunicmarko/jms-messenger-adapter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kunicmarko / jms-messenger-adapter example snippets
// bundles.php
return [
//...
KunicMarko\JMSMessengerAdapter\Bridge\Symfony\JMSMessengerAdapterBundle::class => ['all' => true],
];
use JMS\Serializer\SerializationContext;
use KunicMarko\JMSMessengerAdapter\Stamp\SerializationContextStamp;
$context = SerializationContext::create();
$context->setGroups(['foo']);
$messageBus->dispatch(new Message(), [new SerializationContextStamp($context)]);