PHPackages                             liip/serializer-jms-adapter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. liip/serializer-jms-adapter

Abandoned → [rebuy/serializer-jms-adapter](/?search=rebuy%2Fserializer-jms-adapter)ArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

liip/serializer-jms-adapter
===========================

Adapter to use liip/serializer in place of jms/serializer.

2.2.3(4mo ago)10316.0k↓35.3%4MITPHPPHP ^8.0CI passing

Since Oct 3Pushed 3mo ago8 watchersCompare

[ Source](https://github.com/liip/serializer-jms-adapter)[ Packagist](https://packagist.org/packages/liip/serializer-jms-adapter)[ RSS](/packages/liip-serializer-jms-adapter/feed)WikiDiscussions 2.x Synced 2w ago

READMEChangelog (8)Dependencies (18)Versions (9)Used By (0)

Archived
========

[](#archived)

**This repository is no longer maintained. It is continued as [rebuy/serializer-jms-adapter](https://github.com/rebuy-oss/serializer-jms-adapter).**

Liip Serializer JMS Adapter
===========================

[](#liip-serializer-jms-adapter)

An adapter to make [liip/serializer](https://github.com/liip/serializer) a drop-in replacement for [jms/serializer](https://github.com/schmittjoh/serializer).

Version 1 of this adapter is for integrating JMS Serializer version 1, and version 2 for JMS Serializer version 2 and 3. (Because there are BC breaks in the interfaces of JMS serializer that prevent this library from supporting JMS 1 and 2/3 with the same code.)

This library provides a serializer that attempts to use the Liip Serializer and falls back to JMS serializer on error. You need to use the `Liip\Serializer\Adapter\JMS\AdapterSerializationContext` provided in this library instead of the regular `JMS\Serializer\SerializationContext`. You can use the `Serializer\Adapter\JMS\AdapterSerializationContextFactory` when working with libraries that create the context themselves.

Usage
=====

[](#usage)

```
use JMS\Serializer\Serializer as JMSSerializer;
use Liip\Serializer\Adapter\JMS\JMSSerializerAdapter;
use Liip\Serializer\Serializer as LiipSerializer;

// see https://github.com/liip/serializer/ for how to set up the Liip Serializer
$liipSerializer = new LiipSerializer(...);
// see https://jmsyst.com/libs/serializer for how to set up JMS Serializer
$jmsSerializer = new JMSSerializer(...);

$serializer = new JMSSerializerAdapter($liipSerializer, $jmsSerializer, new NullLogger());

// $serializer can now be used in place of $jmsSerializer
```

Using Liip Serializer only for a Subset of Models
-------------------------------------------------

[](#using-liip-serializer-only-for-a-subset-of-models)

The `JMSSerializerAdapter` accepts an additional constructor argument to specify a list of enabled classes. If that list is specified, only those classes will be attempted to handle with the Liip Serializer. If you want to use JMS Serializer for some of your models and the Liip Serializer for others, use this configuration to avoid overhead and avoid warning log entries from the adapter that you do not care about.

```
$enabledClasses = ['App\Model\Product', 'App\Model\Category'];

$serializer = new JMSSerializerAdapter($liipSerializer, $jmsSerializer, new NullLogger(), $enabledClasses);
```

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance79

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 56.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~300 days

Recently: every ~283 days

Total

9

Last Release

106d ago

Major Versions

1.0.0 → 2.0.02019-10-09

PHP version history (4 changes)1.0.0PHP ^7.1

2.0.0PHP ^7.2

2.1.0PHP ^7.2 || ^8.0

2.2.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/76576?v=4)[David Buchmann](/maintainers/dbu)[@dbu](https://github.com/dbu)

---

Top Contributors

[![dbu](https://avatars.githubusercontent.com/u/76576?v=4)](https://github.com/dbu "dbu (29 commits)")[![Spea](https://avatars.githubusercontent.com/u/495017?v=4)](https://github.com/Spea "Spea (7 commits)")[![thePanz](https://avatars.githubusercontent.com/u/226021?v=4)](https://github.com/thePanz "thePanz (6 commits)")[![Tobion](https://avatars.githubusercontent.com/u/610090?v=4)](https://github.com/Tobion "Tobion (6 commits)")[![mgbmrjnppv](https://avatars.githubusercontent.com/u/122266179?v=4)](https://github.com/mgbmrjnppv "mgbmrjnppv (1 commits)")[![ChristianRiesen](https://avatars.githubusercontent.com/u/1446701?v=4)](https://github.com/ChristianRiesen "ChristianRiesen (1 commits)")[![brutal-factories](https://avatars.githubusercontent.com/u/143793262?v=4)](https://github.com/brutal-factories "brutal-factories (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/liip-serializer-jms-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/liip-serializer-jms-adapter/health.svg)](https://phpackages.com/packages/liip-serializer-jms-adapter)
```

###  Alternatives

[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k382.4M3.7k](/packages/symfony-cache)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M236](/packages/sulu-sulu)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[wikimedia/parsoid

Parsoid, a bidirectional parser between wikitext and HTML5

200569.1k3](/packages/wikimedia-parsoid)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[dagger/dagger

Dagger PHP SDK

271.4k](/packages/dagger-dagger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
