PHPackages                             pew-pew/hydrator - 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. pew-pew/hydrator

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

pew-pew/hydrator
================

Object hydrator kernel library

0.1.0(2y ago)04.0k↑26.7%1MITPHPPHP ^8.3

Since Mar 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/pew-pew-team/hydrator)[ Packagist](https://packagist.org/packages/pew-pew/hydrator)[ RSS](/packages/pew-pew-hydrator/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (1)

 [![](https://raw.githubusercontent.com/pew-pew-team/.github/master/assets/logo.svg)](https://github.com/pew-pew-team)

 [![PHP 8.3+](https://camo.githubusercontent.com/64f163801ecf8ec9be053f759bfbbd4fed90c56950f60293ac3c94df26b8cc6a/68747470733a2f2f706f7365722e707567782e6f72672f7065772d7065772f6879647261746f722f726571756972652f7068703f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pew-pew/hydrator) [![Latest Stable Version](https://camo.githubusercontent.com/603b4733105173ed85a4fa0776bb33766f64fe850bd0367bc78e8b9905aca4be/68747470733a2f2f706f7365722e707567782e6f72672f7065772d7065772f6879647261746f722f76657273696f6e3f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pew-pew/hydrator) [![Latest Unstable Version](https://camo.githubusercontent.com/7caf2ea0a5f25f5f30f1df535b1cb6fd3e11e437b8afb30fad03e679c8bd0d31/68747470733a2f2f706f7365722e707567782e6f72672f7065772d7065772f6879647261746f722f762f756e737461626c653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pew-pew/hydrator) [![License MIT](https://camo.githubusercontent.com/4506002724d21fa05f257d49205a5e15ba27bea60dff092f7d69495d06528501/68747470733a2f2f706f7365722e707567782e6f72672f7065772d7065772f6879647261746f722f6c6963656e73653f7374796c653d666f722d7468652d6261646765)](https://raw.githubusercontent.com/pew-pew-team/hydrator/blob/master/LICENSE)

 [![](https://github.com/pew-pew-team/hydrator/workflows/tests/badge.svg)](https://github.com/pew-pew-team/hydrator/actions) [![](https://github.com/pew-pew-team/hydrator/workflows/codestyle/badge.svg)](https://github.com/pew-pew-team/hydrator/actions) [![](https://github.com/pew-pew-team/hydrator/workflows/security/badge.svg)](https://github.com/pew-pew-team/hydrator/actions) [![](https://github.com/pew-pew-team/hydrator/workflows/static-analysis/badge.svg)](https://github.com/pew-pew-team/hydrator/actions)

Hydrator
========

[](#hydrator)

A set of interfaces for mapping arbitrary values to their typed equivalents and their inverses.

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

[](#installation)

PewPew Hydrator is available as Composer repository and can be installed using the following command in a root of your project:

```
$ composer require pew-pew/hydrator
```

More detailed installation [instructions are here](https://getcomposer.org/doc/01-basic-usage.md).

Usage
-----

[](#usage)

```
$hydrator = new class implements \PewPew\Hydrator\HydratorInterface {
    public function hydrate(string $type, mixed $data): mixed
    {
         return ...;
    }
};

$hydrator = new \PewPew\Hydrator\TraceableHydrator(
    hydrator: $hydrator,
    stopwatch: new \Symfony\Component\Stopwatch\Stopwatch(),
);

$hydrator = new \PewPew\Hydrator\LoggableHydrator(
    hydrator: $hydrator,
    logger: new ExampleLogger(),
);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

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

840d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150420?v=4)[Ruslan Sharipov](/maintainers/Serafim)[@serafim](https://github.com/serafim)

---

Tags

datadeserializerdtohydratorkernelmappermappingserializerstructure

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pew-pew-hydrator/health.svg)

```
[![Health](https://phpackages.com/badges/pew-pew-hydrator/health.svg)](https://phpackages.com/packages/pew-pew-hydrator)
```

###  Alternatives

[symfony/lock

Creates and manages locks, a mechanism to provide exclusive access to a shared resource

514139.2M693](/packages/symfony-lock)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k53](/packages/ecotone-ecotone)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M577](/packages/shopware-core)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)

PHPackages © 2026

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