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

ActiveLibrary

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

Symfony extension for PHPrimitives.

1.0.0(1w ago)00MITPHP

Since Mar 11Pushed 1w 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 today

READMEChangelog (1)Dependencies (2)Versions (2)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

35

—

LowBetter than 81% of packages

Maintenance98

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

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

Unknown

Total

1

Last Release

10d 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 (1 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

[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k47.0M206](/packages/api-platform-core)[friendsofsymfony/jsrouting-bundle

A pretty nice way to expose your Symfony routing to client applications.

1.5k52.7M205](/packages/friendsofsymfony-jsrouting-bundle)[sonata-project/admin-bundle

The missing Symfony Admin Generator

2.1k18.7M273](/packages/sonata-project-admin-bundle)[symfony/serializer-pack

A pack for the Symfony serializer

1.1k27.9M196](/packages/symfony-serializer-pack)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k6.8M151](/packages/icanhazstring-composer-unused)[spatie/phpunit-snapshot-assertions

Snapshot testing with PHPUnit

69417.3M430](/packages/spatie-phpunit-snapshot-assertions)

PHPackages © 2026

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