Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Jms Messenger Adapter

Jms Messenger Adapter Laravel Package

kunicmarko/jms-messenger-adapter

A Symfony Messenger adapter that lets JMS Serializer handle your message serialization, replacing the default PHP serializer so messages can travel as JSON, XML, or other JMS-supported formats with full metadata and type handling support.

View on GitHub
Deep Wiki
Context7

kunicmarko/jms-messenger-adapter bridges JMS Serializer and Symfony Messenger, allowing Messenger to use JMS serialization for message payloads instead of the default Symfony Serializer. It is useful when your application already depends on JMS annotations/metadata or needs consistent serialization between HTTP requests and async messages.

  • Drop-in Messenger serializer adapter backed by JMS Serializer
  • Serializes and deserializes Messenger message payloads
  • Reuses existing JMS metadata, annotations, and handlers
  • Keeps HTTP and async message serialization consistent
  • Integrates with Symfony’s service container
Frequently asked questions about Jms Messenger Adapter
Is kunicmarko/jms-messenger-adapter compatible with Laravel?
No, not as a drop-in. The package is a Symfony Messenger bridge and assumes Symfony service wiring; Laravel's queue serializes jobs through SerializesModels and has no Envelope or Stamp concept. It only makes sense if you already run symfony/messenger standalone inside a Laravel app, which is uncommon.
What does kunicmarko/jms-messenger-adapter do?
It provides a Symfony Messenger SerializerInterface implementation that uses JMS Serializer to encode and decode an Envelope plus its Stamps on the wire. That lets you keep JMS metadata, serialization groups, and custom handlers for message payloads while transports continue to work. It is a small adapter, not an architectural capability.
Is kunicmarko/jms-messenger-adapter still maintained?
No. The last release was 2021-06-16 and the project is archived, with no security response process or compatibility work for PHP 8.2/8.3 or Symfony 6.4/7. The bus factor is one and effectively zero now. Treat it as MIT-licensed source code to own or fork, not as a live dependency.
Which PHP, Symfony, and JMS Serializer versions does it support?
Expect older constraints that may conflict with modern PHP 8.2/8.3, symfony/messenger 6.4/7.x, and jms/serializer 3.x. You should verify the Composer constraints against your runtime and plan to patch or relax them. Annotation-to-attribute migration for JMS metadata is also likely needed.
How do I install and configure the adapter with Symfony Messenger?
Install it with Composer, register the serializer as a service, and point your Messenger transport's serializer option at it. You also need JMS metadata driver and cache directory wiring. In a Laravel app there is no bundle or DI configuration for this, so integration effort is higher.
Is it safe to deserialize queue messages with JMS Serializer?
Serialization is an attack surface, and JMS deserialization of broker payloads raises gadget-chain and type-confusion concerns. An unmaintained library handling untrusted messages is a poor place to accept that risk. Prefer Symfony's first-party serializer, Laravel's queue payload handling, or a thin explicit JSON serializer unless JMS is mandatory.
What are the alternatives to this package?
On Symfony Messenger, use the built-in Symfony Serializer integration with a normalizer or the native PHP serializer. On Laravel, use the queue with typed DTOs and an explicit JSON serializer rather than introducing Messenger just for this adapter. A small hand-written JSON serializer is often fewer moving parts and is supported upstream.
Do I need JMS Serializer to use Symfony Messenger?
No. Symfony Messenger works with its own serializers by default. Use this adapter only if existing message contracts, JMS metadata, groups, or custom handlers mandate JMS Serializer. If JMS is just a preference, skip the extra dependency and risk.
Can I fork or vendor kunicmarko/jms-messenger-adapter?
Yes. The MIT license permits copying the serializer into your codebase under an internal namespace or forking the repository. If JMS is mandated, pin the fork, add a CI matrix for your PHP and Symfony versions, and own the security response. Do this before the first production message is sent.
Does it work with AMQP, Redis, or Doctrine transports?
The adapter sits inside the existing broker path, so it is transport-agnostic as long as the Messenger transport accepts a serializer option. No infrastructure changes are required. Real friction is JMS metadata and cache configuration plus version alignment, not the transport itself.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core