PHPackages                             yobud/easy-serializer-bundle - 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. yobud/easy-serializer-bundle

ActiveSymfony-bundle[Parsing &amp; Serialization](/categories/parsing)

yobud/easy-serializer-bundle
============================

This bundles handles a very simple and YAML serialization mapping with ExpressionLanguage security

038PHP

Since Feb 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/yobud/easy-serializer-bundle)[ Packagist](https://packagist.org/packages/yobud/easy-serializer-bundle)[ RSS](/packages/yobud-easy-serializer-bundle/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

EasySerializerBundle
====================

[](#easyserializerbundle)

EasySerializerBundle aims to make serialization in ApiPlatform easier and smarter with security expressions.

**!!! It's NOT ready for production for now !!!**

It allows you to store your serialization in yaml files like below :

Let's have entities `A`, `B`, `C`, `D` with some relations between them (`a.b`, `a.d`, `b.cd`) with dumb names "Ah", "Beh", "Ceh", "Ceh 2" and "Deh".

```
# api/config/easy-serializer/demo-serializer.yaml

App\Entity\A:
    item.normalization.get: # [item|collection|any].[normalization|denormalization|any].route_name
        name: # will always serialize
        b: # automatically cascade serialization in related entities
            _maxDepth: 3 # supports all ApiPlatform serialization options when prefixed with underscores
            cs:
                _security: object.getName() === 'Ah' # Root serialized object name (App\Entity\A) must be "Ah" to serialize cs and deeper
                name:
        d:
            _security_admin: is_granted('ROLE_ADMIN') # User must be admin path to get deeper serialization / security can be namespaced (here _admin)
            _admin.name:
                _maxDepth: 1
```

Requesting `/as/1` as admin will result in the following :

```
{
  "@context": "/contexts/A",
  "@id": "/as/1",
  "@type": "A",
  "name": "Ah",
  "d": {
    "@id": "/ds/1",
    "@type": "D",
    "name": "Deh"
  },
  "b": {
    "@id": "/bs/1",
    "@type": "B",
    "cs": [
      {
        "@id": "/cs/1",
        "@type": "C",
        "name": "Ceh"
      },
      {
        "@id": "/cs/2",
        "@type": "C",
        "name": "Ceh 2"
      }
    ]
  }
}
```

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require yobud/easy-serializer-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require yobud/easy-serializer-bundle
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
   Yobud\Bundle\EasySerializerBundle\EasySerializerBundle::class => ['all' => true],
];
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/858204?v=4)[Jérémy Hubert](/maintainers/yobud)[@yobud](https://github.com/yobud)

---

Top Contributors

[![yobud](https://avatars.githubusercontent.com/u/858204?v=4)](https://github.com/yobud "yobud (8 commits)")

### Embed Badge

![Health badge](/badges/yobud-easy-serializer-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/yobud-easy-serializer-bundle/health.svg)](https://phpackages.com/packages/yobud-easy-serializer-bundle)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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