PHPackages                             bowlofsoup/normalizer-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. [Database &amp; ORM](/categories/database)
4. /
5. bowlofsoup/normalizer-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

bowlofsoup/normalizer-bundle
============================

Normalizer for objects.

v5.4.2(2y ago)1135.9k↓42.4%3[3 PRs](https://github.com/BowlOfSoup/NormalizerBundle/pulls)MITPHPPHP &gt;=7.2CI passing

Since Sep 9Pushed 4mo ago3 watchersCompare

[ Source](https://github.com/BowlOfSoup/NormalizerBundle)[ Packagist](https://packagist.org/packages/bowlofsoup/normalizer-bundle)[ RSS](/packages/bowlofsoup-normalizer-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (34)Used By (0)

Bowl Of Soup Normalizer
=======================

[](#bowl-of-soup-normalizer)

[![Build Status](https://github.com/BowlOfSoup/NormalizerBundle/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/BowlOfSoup/NormalizerBundle/actions/workflows/ci.yaml)[![codecov](https://camo.githubusercontent.com/efa76abf24b2d0ec3859b33ea0122b1ff29c2620f74e48dbeeb7dd35629f0110/68747470733a2f2f636f6465636f762e696f2f67682f426f776c4f66536f75702f4e6f726d616c697a657242756e646c652f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d324f57344557764d5544)](https://codecov.io/gh/BowlOfSoup/NormalizerBundle)[![PHP Version](https://camo.githubusercontent.com/d8161db796eaa36d39ef0cc175518bae6027a7aa4168dc1d946d66bc73dc286b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e322e782532302d2d253230382e322e782d626c75652e737667)](https://www.php.net/)[![Symfony Version](https://camo.githubusercontent.com/f7ca77ff99f125dd21c133f4dd4ee8fe1f5abcc43e3e6640b5158e7f33dc0c2a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d352e342e782d626c75652e737667)](https://symfony.com/)

Installation
------------

[](#installation)

```
composer require bowlofsoup/normalizer-bundle

```

Add the bundle to your `config/bundles.php` file

```
BowlOfSoup\NormalizerBundle\BowlOfSoupNormalizerBundle::class => ['all' => true],

```

Quick feature overview
----------------------

[](#quick-feature-overview)

- It's a Symfony bundle!
- Normalizes class properties and methods (public, protected, private)
- Can Serialize normalized content
- Works with Symfony and Doctrine as its ORM. Can handle Doctrine proxies
- Circular reference check: Handles circular reference by detecting it and returning content of the objects getId() method
- Object caching: If a getId() method is implemented for an object it will cache the normalized object per normalize command
- Annotation caching, this means speed!
    - The annotations for an object are cached. This means not parsing annotations multiple times for the same object. per flow (per normalize command)
    - In Symfony prod mode, annotations are cached completely (after first run)
- Symfony translations
    - Indicate domain (translation filename) and locale in annotations
    - Does not support formatting with ICU MessageFormat (yet), so no parameters

The main features are described in the [documentation](https://github.com/BowlOfSoup/NormalizerBundle/wiki).

Documentation
-------------

[](#documentation)

Documentation on the usage and all supported options can be found [in the wiki](https://github.com/BowlOfSoup/NormalizerBundle/wiki).

1. [What is serialization and normalization?](https://github.com/BowlOfSoup/NormalizerBundle/wiki/What-is-serialization-and-normalization%3F)
2. [Installation](https://github.com/BowlOfSoup/NormalizerBundle/wiki/Installation)
3. [Serializing](https://github.com/BowlOfSoup/NormalizerBundle/wiki/Serializing)
    1. [Serialize annotations](https://github.com/BowlOfSoup/NormalizerBundle/wiki/Serialize-annotations)
4. [Normalizing](https://github.com/BowlOfSoup/NormalizerBundle/wiki/Normalizing)
    1. [Normalize annotations](https://github.com/BowlOfSoup/NormalizerBundle/wiki/Normalize-annotations)
5. [Translate a value](https://github.com/BowlOfSoup/NormalizerBundle/wiki/Translate-a-value)
    1. [Translate annotations](https://github.com/BowlOfSoup/NormalizerBundle/wiki/Translate-annotations)

Why use this normalizer and not ...
-----------------------------------

[](#why-use-this-normalizer-and-not-)

- The Bowl Of Soup Normalizer uses an opt-in mechanism by default. You have to indicate which properties must be normalized
- You can indicate a context group, how is the value to be normalized, in which context?
- It's designed with speed in mind. Not packed with features for which you don't use half of it
- It has proven itself in a complex application with 15.000+ daily end users

Development
-----------

[](#development)

The following CI tools can be used to check for code quality before pushing code:

### Rector

[](#rector)

Rector can be used to automated code upgrades and refactoring. Try a dry-run first!

```
vendor/bin/rector process --dry-run --no-progress-bar --ansi
```

### PHPStan

[](#phpstan)

PHPStan is a static code analysis tool that focuses on finding errors in the code. Fixing the outcome of PHPStan prevents possible bugs and errors.

```
vendor/bin/phpstan
```

### PHPUnit

[](#phpunit)

Speaks for itself, code should be tested. Run with coverage (output = tests/coverage):

```
XDEBUG_MODE=coverage php -dzend_extension=xdebug.so vendor/bin/phpunit
```

Or without coverage:

```
vendor/bin/phpunit
```

**Code coverage** `master`:

[![](https://camo.githubusercontent.com/02c1b41b7d13229398dcb0efcf8fd45a7f30a5a2094dcebcfa62ba529881d4b3/68747470733a2f2f636f6465636f762e696f2f67682f426f776c4f66536f75702f4e6f726d616c697a657242756e646c652f6272616e63682f6d61737465722f6772617068732f73756e62757273742e7376673f746f6b656e3d324f57344557764d5544)](https://camo.githubusercontent.com/02c1b41b7d13229398dcb0efcf8fd45a7f30a5a2094dcebcfa62ba529881d4b3/68747470733a2f2f636f6465636f762e696f2f67682f426f776c4f66536f75702f4e6f726d616c697a657242756e646c652f6272616e63682f6d61737465722f6772617068732f73756e62757273742e7376673f746f6b656e3d324f57344557764d5544)

### Code style fixer

[](#code-style-fixer)

Have php-cs-fixer automatically fix styling.

```
vendor/bin/php-cs-fixer fix
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance52

Moderate activity, may be stable

Popularity36

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 92.4% 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 ~101 days

Recently: every ~28 days

Total

28

Last Release

810d ago

Major Versions

1.1.x-dev → 2.02020-04-28

2.1.x-dev → 3.0.02020-09-16

3.0.2 → 4.4.x-dev2023-11-06

v4.4 → v5.42023-11-07

PHP version history (2 changes)1.0.0PHP &gt;=5.3

2.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2a058c9460fbbaadc646b3daf1083a2bccc1318a8775e97c6bfea0a2faed4ed?d=identicon)[BowlOfSoup](/maintainers/BowlOfSoup)

---

Top Contributors

[![BowlOfSoup](https://avatars.githubusercontent.com/u/19224810?v=4)](https://github.com/BowlOfSoup "BowlOfSoup (121 commits)")[![raymondschouten](https://avatars.githubusercontent.com/u/21282689?v=4)](https://github.com/raymondschouten "raymondschouten (7 commits)")[![wcoppens](https://avatars.githubusercontent.com/u/181460?v=4)](https://github.com/wcoppens "wcoppens (2 commits)")[![gabriel-255](https://avatars.githubusercontent.com/u/19374371?v=4)](https://github.com/gabriel-255 "gabriel-255 (1 commits)")

---

Tags

annotationsapiarraydoctrinedoctrine-ormnormalizationnormalizerserializationserializersymfonysymfony-bundletranslationnormalizerarrayobjectrepresentation

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/bowlofsoup-normalizer-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/bowlofsoup-normalizer-bundle/health.svg)](https://phpackages.com/packages/bowlofsoup-normalizer-bundle)
```

###  Alternatives

[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[doctrine/phpcr-bundle

Symfony DoctrinePHPCRBundle

1602.6M41](/packages/doctrine-phpcr-bundle)[bolt/core

🧿 Bolt Core

585142.5k54](/packages/bolt-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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