PHPackages                             fasano/phprimitives-symfony - 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. fasano/phprimitives-symfony

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

fasano/phprimitives-symfony
===========================

Symfony extension for PHPrimitives.

1.0.1(3mo ago)03MITPHP

Since Mar 11Pushed 3mo agoCompare

[ Source](https://github.com/n-fasano/phprimitives-symfony)[ Packagist](https://packagist.org/packages/fasano/phprimitives-symfony)[ RSS](/packages/fasano-phprimitives-symfony/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

PHPrimitives - Symfony
----------------------

[](#phprimitives---symfony)

Symfony Serializer integration for [PHPrimitives](https://github.com/n-fasano/phprimitives).

### Installation

[](#installation)

```
composer require fasano/phprimitives-symfony
```

### Setup

[](#setup)

Register the denormalizer as a tagged service in `services.yaml`:

```
Fasano\PHPrimitives\Symfony\PrimitiveDenormalizer:
    tags:
        - { name: serializer.normalizer }
```

### Usage

[](#usage)

Any class implementing `Primitive` will be automatically denormalized via its `construct()` method. Primitive properties are denormalized directly from their scalar backing values.

```
use Symfony\Component\Serializer\SerializerInterface;

final readonly class UserDto
{
    public function __construct(
        public Email $email,
        public Age $age,
    ) {}
}

$user = $serializer->denormalize([
    'email' => 'john.doe@example.com',
    'age' => 21,
], UserDto::class);
```

Normalization
-------------

[](#normalization)

Normalization (serializing primitives back to scalars) is handled out of the box by PHPrimitives' built-in `JsonSerializable` support, no additional normalizer needed.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance82

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

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.

###  Release Activity

Cadence

Every ~10 days

Total

2

Last Release

94d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16bb6f7b889777bcd3237bbddd90a3707306fc1803da0bd10c3710086b8702a4?d=identicon)[nfasano](/maintainers/nfasano)

---

Top Contributors

[![n-fasano](https://avatars.githubusercontent.com/u/46872160?v=4)](https://github.com/n-fasano "n-fasano (3 commits)")

---

Tags

phpprimitive-typessymfonysymfony-serializer

### Embed Badge

![Health badge](/badges/fasano-phprimitives-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/fasano-phprimitives-symfony/health.svg)](https://phpackages.com/packages/fasano-phprimitives-symfony)
```

###  Alternatives

[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

53675.5k15](/packages/solspace-craft-freeform)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)[api-platform/state

API Platform state interfaces

244.3M112](/packages/api-platform-state)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6548.7k1](/packages/spomky-labs-pwa-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[verbb/shippy

A framework agnostic, multi-carrier shipping library for PHP.

1611.3k2](/packages/verbb-shippy)

PHPackages © 2026

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