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

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

chanshige/object-hydrator
=========================

An ObjectHydrator that array to object to array conversion

v2.3.0(3y ago)1733↓100%MITPHPPHP &gt;=8.1

Since Apr 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/chanshige/object-hydrator)[ Packagist](https://packagist.org/packages/chanshige/object-hydrator)[ RSS](/packages/chanshige-object-hydrator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (10)Used By (0)

ObjectHydrator
==============

[](#objecthydrator)

An ObjectHydrator that array to object to array conversion. It internally uses Symfony/Serializer (with ObjectNormalizer).

- オブジェクトから配列への変換
- 配列のデータを、特定のオブジェクトにセット

installation
------------

[](#installation)

With Composer

```
$ composer require chanshige/object-hydrator 'v1.0'

```

Usage
-----

[](#usage)

```
/** @var ObjectHydratorInterface $hydrator */
$hydrator = (new ObjectHydratorFactory())->newInstance();

### Put data from an array into an object. ###
/** @var Example $object */
$object = $hydrator->hydrate(array or stdClass, Example::class);

### Convert object to array. ###
/** @var array */
$array = $hydrator->extract($object);

```

Test
----

[](#test)

```
$ composer test

```

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

[](#contributing)

Feel free to create issues and submit pull requests. For any PR submitted, make sure it is covered by tests or include new tests.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

License
-------

[](#license)

MIT

Author
------

[](#author)

[chanshige](https://twitter.com/chanshige)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

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

Recently: every ~129 days

Total

6

Last Release

1299d ago

Major Versions

v1.0.1 → v2.0.02021-06-01

PHP version history (4 changes)v1.0.0PHP &gt;=7.3

v2.0.0PHP ^8.0

v2.2.0PHP &gt;=8.0

v2.3.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f88b3af7bdd8bffbaee7d2adb8740318b20224b6c74c60cbfab12abed8c6e839?d=identicon)[chanshige](/maintainers/chanshige)

---

Top Contributors

[![chanshige](https://avatars.githubusercontent.com/u/1973281?v=4)](https://github.com/chanshige "chanshige (15 commits)")

---

Tags

arrayconvertobjecthydration

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k295.3M2.5k](/packages/symfony-property-access)[cuyz/valinor

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

1.5k9.2M108](/packages/cuyz-valinor)[yzen.dev/plain-to-class

Class-transformer to transform your dataset into a structured object

16293.9k6](/packages/yzendev-plain-to-class)[jasny/dotkey

Dot notation access for objects and arrays

14219.5k6](/packages/jasny-dotkey)[michaldudek/foundation

A set of useful PHP classes.

13111.9k13](/packages/michaldudek-foundation)[peridot-php/object-path

A string syntax to fetch values from array and object hierarchies

1053.6k1](/packages/peridot-php-object-path)

PHPackages © 2026

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