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

Abandoned → [getwarp/laminas-hydrator-bridge](/?search=getwarp%2Flaminas-hydrator-bridge)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

spaceonfire/laminas-hydrator-bridge
===================================

Provides integration for Laminas Hydrator with some spaceonfire libraries

2.5.2(4y ago)11.8k↓90%4MITPHPPHP ^7.2|^8.0

Since Oct 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/spaceonfire/laminas-hydrator-bridge)[ Packagist](https://packagist.org/packages/spaceonfire/laminas-hydrator-bridge)[ Docs](https://github.com/spaceonfire/laminas-hydrator-bridge)[ Fund](https://liberapay.com/hustlahusky)[ RSS](/packages/spaceonfire-laminas-hydrator-bridge/feed)WikiDiscussions 2.5.x Synced 1w ago

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

Laminas Hydrator Bridge by spaceonfire
======================================

[](#laminas-hydrator-bridge-by-spaceonfire)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8bd15880961d3d080d1f979517a9ccf86d6d45f6e31cee5ee9122226bdfbc37a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73706163656f6e666972652f6c616d696e61732d6879647261746f722d6272696467652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spaceonfire/laminas-hydrator-bridge)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/bc5f1e070b9839e73ddb682a5667ad4d8f93852ea50fbe61126a653e20ed6a19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73706163656f6e666972652f6c616d696e61732d6879647261746f722d6272696467652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spaceonfire/laminas-hydrator-bridge)[![Code Coverage](https://camo.githubusercontent.com/f9e8e6498493fb0034930d6f67d4937b7ba05e70eff748b8c33e71ceec9ba764/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d6874747073253341253246253246676973742e67697468756275736572636f6e74656e742e636f6d253246687573746c616875736b7925324664363236303763316132653437303739353962303134326530656138373663642532467261772532466c616d696e61732d6879647261746f722d6272696467652e6a736f6e)](https://camo.githubusercontent.com/f9e8e6498493fb0034930d6f67d4937b7ba05e70eff748b8c33e71ceec9ba764/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d6874747073253341253246253246676973742e67697468756275736572636f6e74656e742e636f6d253246687573746c616875736b7925324664363236303763316132653437303739353962303134326530656138373663642532467261772532466c616d696e61732d6879647261746f722d6272696467652e6a736f6e)

Provides integration for [Laminas Hydrator](https://github.com/laminas/laminas-hydrator) with some [`spaceonfire`](https://packagist.org/packages/spaceonfire)libraries.

Install
-------

[](#install)

Via Composer

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

Usage
-----

[](#usage)

```
use spaceonfire\LaminasHydratorBridge\StdClassHydrator;
use spaceonfire\LaminasHydratorBridge\NamingStrategy\AliasNamingStrategy;
use spaceonfire\LaminasHydratorBridge\Strategy\BooleanStrategy;
use spaceonfire\LaminasHydratorBridge\Strategy\ScalarStrategy;
use spaceonfire\LaminasHydratorBridge\Strategy\NullableStrategy;
use spaceonfire\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/spaceonfire/spaceonfire/issues) and [send Pull Requests](https://github.com/spaceonfire/spaceonfire/pulls) in the [main spaceonfire repository](https://github.com/spaceonfire/spaceonfire). Please see [CONTRIBUTING](https://github.com/spaceonfire/spaceonfire/blob/master/CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](https://github.com/spaceonfire/spaceonfire/blob/master/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

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

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

Total

7

Last Release

1506d ago

Major Versions

1.0.1 → 2.5.02021-04-21

2.5.x-dev → 3.0.x-dev2022-04-03

PHP version history (3 changes)1.0.0PHP ^7.2

1.0.1PHP ^7.2|^8.0

3.0.x-devPHP ^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

laminashydratorlaminas-hydratorspaceonfire

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/spaceonfire-laminas-hydrator-bridge/health.svg)](https://phpackages.com/packages/spaceonfire-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

236103.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)
