PHPackages                             getwarp/laminas-hydrator-bridge - 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. getwarp/laminas-hydrator-bridge

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

getwarp/laminas-hydrator-bridge
===============================

Integration for Laminas Hydrator with other Warp components

3.1.3(3y ago)18611MITPHPPHP ^7.4|^8.0

Since Apr 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/getwarp/laminas-hydrator-bridge)[ Packagist](https://packagist.org/packages/getwarp/laminas-hydrator-bridge)[ Docs](https://github.com/getwarp/laminas-hydrator-bridge)[ GitHub Sponsors](https://github.com/getwarp)[ GitHub Sponsors](https://github.com/hustlahusky)[ RSS](/packages/getwarp-laminas-hydrator-bridge/feed)WikiDiscussions 3.1.x Synced 1mo ago

READMEChangelogDependencies (6)Versions (11)Used By (1)

getwarp/laminas-hydrator-bridge
===============================

[](#getwarplaminas-hydrator-bridge)

Integration for [Laminas Hydrator](https://github.com/laminas/laminas-hydrator) with other Warp components

[GitHub](https://github.com/getwarp/laminas-hydrator-bridge) • [Packagist](https://packagist.org/packages/getwarp/laminas-hydrator-bridge) • [Installation](#installation) • [Usage](#usage)

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

[](#installation)

Via Composer

```
$ composer require getwarp/laminas-hydrator-bridge
```

Usage
-----

[](#usage)

```
use Warp\LaminasHydratorBridge\StdClassHydrator;
use Warp\LaminasHydratorBridge\NamingStrategy\AliasNamingStrategy;
use Warp\LaminasHydratorBridge\Strategy\BooleanStrategy;
use Warp\LaminasHydratorBridge\Strategy\ScalarStrategy;
use Warp\LaminasHydratorBridge\Strategy\NullableStrategy;
use Warp\Type\BuiltinType;

$hydrator = new StdClassHydrator();

$hydrator->setNamingStrategy(new AliasNamingStrategy([
    'firstName' => ['first_name', 'firstname'],
    'lastName' => ['last_name', 'lastname'],
    'rulesAccepted' => ['rules_accepted'],
]));

$hydrator->addStrategy('age', new NullableStrategy(new ScalarStrategy(BuiltinType::INT)));
$hydrator->addStrategy('rulesAccepted', new BooleanStrategy(['Y', 'y', 1], 'N', false));

$john = $hydrator->hydrate([
    'first_name' => 'John',
    'last_name' => 'Doe',
    'rules_accepted' => 'y',
    'age' => '25',
], new stdClass());

// $john->firstName === 'John';
// $john->lastName === 'Doe';
// $john->rulesAccepted === true;
// $john->age === 25;

$jane = $hydrator->hydrate([
    'firstname' => 'Jane',
    'lastname' => 'Doe',
    'rules_accepted' => '',
    'age' => null,
], new stdClass());

// $jane->firstName === 'John';
// $jane->lastName === 'Doe';
// $jane->rulesAccepted === false;
// $jane->age === null;
```

Change log
----------

[](#change-log)

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

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

[](#contributing)

[Report issues](https://github.com/getwarp/warp/issues) and [send Pull Requests](https://github.com/getwarp/warp/pulls) in the [main warp repository](https://github.com/getwarp/warp). Please see [CONTRIBUTING](https://github.com/getwarp/warp/blob/3.1.x/CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](https://github.com/getwarp/.github/blob/main/CODE_OF_CONDUCT.md) for details.

Credits
-------

[](#credits)

- [Constantine Karnaukhov](https://github.com/hustlahusky)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~32 days

Recently: every ~22 days

Total

11

Last Release

1154d ago

Major Versions

2.5.3 → 3.0.02022-04-22

2.5.x-dev → 3.0.22022-06-12

PHP version history (2 changes)2.5.3PHP ^7.2|^8.0

3.0.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3947942?v=4)[Constantine Karnaukhov](/maintainers/tntrex)[@tntrex](https://github.com/tntrex)

---

Top Contributors

[![tntrex](https://avatars.githubusercontent.com/u/3947942?v=4)](https://github.com/tntrex "tntrex (13 commits)")

---

Tags

laminashydratorwarplaminas-hydrator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/getwarp-laminas-hydrator-bridge/health.svg)

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

###  Alternatives

[laminas/laminas-code

Extensions to the PHP Reflection API, static code scanning, and code generation

1.9k185.4M172](/packages/laminas-laminas-code)[laminas/laminas-eventmanager

Trigger and listen to events within a PHP application

1.0k69.8M225](/packages/laminas-laminas-eventmanager)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k9.2M108](/packages/cuyz-valinor)[laminas/laminas-stdlib

SPL extensions, array utilities, error handlers, and more

235103.2M438](/packages/laminas-laminas-stdlib)[laminas/laminas-uri

A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)

3834.9M89](/packages/laminas-laminas-uri)[laminas/laminas-config-aggregator

Lightweight library for collecting and merging configuration from different sources

384.0M124](/packages/laminas-laminas-config-aggregator)

PHPackages © 2026

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