mrandmrssmith/symfony-messenger-json-serializer

Provide a JSON serializer for Symfony Messenger messages

v1.0.0 2024-02-23 09:03 UTC

This package is auto-updated.

Last update: 2024-04-30 14:46:15 UTC


README

A JSON serializer for external messages from Symfony Messenger. This will allow you to have one single JSON serializer for all your external message. You only need to register the service, alias it and mention which message you would like to be deserialized.

Installation

Add this package to your project

composer require mrandmrssmith/symfony-messenger-json-serializer

Usage

  1. Configure Messenger
framework:
    messenger:
        transports:
            external:
                dsn: '%env(MESSENGER_DSN)%'
                serializer: external_message.messenger.serializer

        routing:
             'MrAndMrsSmith\Queue\ExternalMessage': external
  1. Configure your serializer
  external_message.messenger.serializer:
    class: MrAndMrsSmith\SymfonyMessengerJSONSerializer\Serializer\MessengerJSONSerializer
    arguments:
      $messageClass: MrAndMrsSmith\Queue\ExternalMessage

Support

🤗 Please consider contributing if you feel you can improve this package, otherwise submit an issue via the GitHub page and include as much information as possible, including steps to reproduce, platform versions and anything else to help pinpoint the root cause.

Contributing

👍 If you do contribute, we thank you, but please review the CONTRIBUTING document to help us ensure the project is kept consistent and easy to maintain.

Versioning

⌛ This project will follow Semantic Versioning 2.0.0.

Changes

🛠️ All project changes/releases are noted in the GitHub releases page and in the CHANGELOG file.

Following conventions laid out by keep a changelog.