PHPackages                             morrislaptop/symfony-custom-normalizers - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. morrislaptop/symfony-custom-normalizers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

morrislaptop/symfony-custom-normalizers
=======================================

Normalizers for common classes around the place

v0.5.0(4y ago)2651.1k↓88.2%1[1 issues](https://github.com/morrislaptop/symfony-custom-normalizers/issues)1MITPHPPHP ^7.4|^8.0

Since Mar 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/morrislaptop/symfony-custom-normalizers)[ Packagist](https://packagist.org/packages/morrislaptop/symfony-custom-normalizers)[ Docs](https://github.com/morrislaptop/symfony-custom-normalizers)[ GitHub Sponsors](https://github.com/morrislaptop)[ RSS](/packages/morrislaptop-symfony-custom-normalizers/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (12)Versions (8)Used By (1)

Normalizers for common classes around the place
===============================================

[](#normalizers-for-common-classes-around-the-place)

[![Latest Version on Packagist](https://camo.githubusercontent.com/652ed2e378467d39f6195e0b308faf2f1bc8dd3aa978f5b47c8f4ca347d27594/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f727269736c6170746f702f73796d666f6e792d637573746f6d2d6e6f726d616c697a6572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/morrislaptop/symfony-custom-normalizers)[![GitHub Tests Action Status](https://camo.githubusercontent.com/fced3c0b42292d05d314a8476179d898583335dc53174c48e73520c7b830c835/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d6f727269736c6170746f702f73796d666f6e792d637573746f6d2d6e6f726d616c697a6572732f54657374733f6c6162656c3d7465737473)](https://github.com/morrislaptop/symfony-custom-normalizers/actions?query=workflow%3ATests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/d7d1c547f20995d06bf94b6f142a8e33f01b8d6ab68c98bfb6b36c14ea2f51b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f727269736c6170746f702f73796d666f6e792d637573746f6d2d6e6f726d616c697a6572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/morrislaptop/symfony-custom-normalizers)

A collection of normalizers that can be used with the Symfony serializer.

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

[](#installation)

You can install the package via composer:

```
composer require morrislaptop/symfony-custom-normalizers
```

Supported Classes
-----------------

[](#supported-classes)

- [Brick Money](https://github.com/brick/money)
- [MoneyPHP Money](https://github.com/moneyphp/money)
- [Carbon](https://carbon.nesbot.com/)
- [DatePeriod](https://www.php.net/manual/en/class.dateperiod.php)
- [Laravel ModelIdentifier](https://laravel.com/api/8.x/Illuminate/Contracts/Database/ModelIdentifier.html)

Meta Classes
------------

[](#meta-classes)

- Any class with a `__toString()` method
- Any class with a `parse($str)` method
- Any class with a `__toString()` if it has a `parse($str)` method as well
- ObjectDocblocksNormalizer which simply extends Symfony's ObjectNormalizer but it supports docblocks as well

Usage
-----

[](#usage)

```
$serializer = new Symfony\Serializer([
    new Morrislaptop\SymfonyCustomNormalizers\MoneyNormalizer(),
    new Morrislaptop\SymfonyCustomNormalizers\DatePeriodNormalizer(),
    ...
])
```

Plug
----

[](#plug)

Use Laravel? Easily cast your objects using the Symfony serializer with [morrislaptop/laravel-popo-caster](https://github.com/morrislaptop/laravel-popo-caster)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Craig Morris](https://github.com/morrislaptop)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~65 days

Recently: every ~98 days

Total

7

Last Release

1546d ago

### Community

Maintainers

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

---

Top Contributors

[![morrislaptop](https://avatars.githubusercontent.com/u/67807?v=4)](https://github.com/morrislaptop "morrislaptop (27 commits)")

---

Tags

morrislaptopsymfony-custom-normalizers

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/morrislaptop-symfony-custom-normalizers/health.svg)

```
[![Health](https://phpackages.com/badges/morrislaptop-symfony-custom-normalizers/health.svg)](https://phpackages.com/packages/morrislaptop-symfony-custom-normalizers)
```

###  Alternatives

[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[api-platform/symfony

Symfony API Platform integration

384.5M129](/packages/api-platform-symfony)[symfony/ai-platform

PHP library for interacting with AI platform provider.

521.4M289](/packages/symfony-ai-platform)[api-platform/state

API Platform state interfaces

274.9M136](/packages/api-platform-state)[api-platform/serializer

API Platform core Serializer

274.8M87](/packages/api-platform-serializer)[api-platform/validator

API Platform validator component

274.6M27](/packages/api-platform-validator)

PHPackages © 2026

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