PHPackages                             smirnov-o/mapper - 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. smirnov-o/mapper

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

smirnov-o/mapper
================

PHP Mapping and ReadOnly Dto with Attributes

2.0.0(4mo ago)1458MITPHPPHP ^8.2CI passing

Since Jun 17Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/smirnov-o/Mapper)[ Packagist](https://packagist.org/packages/smirnov-o/mapper)[ RSS](/packages/smirnov-o-mapper/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (3)Versions (14)Used By (0)

PHP Mapper and Dto on attributes
================================

[](#php-mapper-and-dto-on-attributes)

[![Packagist Version (custom server)](https://camo.githubusercontent.com/eb32f2ad8f472b0800b0f78a8ec34d1e9a0dcd6c6481096392a044858ef0860f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736d69726e6f762d6f2f4d6170706572)](https://camo.githubusercontent.com/eb32f2ad8f472b0800b0f78a8ec34d1e9a0dcd6c6481096392a044858ef0860f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736d69726e6f762d6f2f4d6170706572)[![Packagist License (custom server)](https://camo.githubusercontent.com/b8c7ae6ac09c61c1d9d4a1b542bd9038c2eb08d7655903c5d3325e087bbf9da8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736d69726e6f762d6f2f4d6170706572)](https://camo.githubusercontent.com/b8c7ae6ac09c61c1d9d4a1b542bd9038c2eb08d7655903c5d3325e087bbf9da8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736d69726e6f762d6f2f4d6170706572)

#### RU

[](#ru)

- Маппинг массива любой вложенности в новый массив или свойства класса.
- Dto с использованием атрибутов (ElementName, CastMethod, CastDefault, CastMethodDefault).
- В процессе обработки массива можно изменять данные своими методами.

Пример Dto в [Example](src%2FExample).

[Документация](README_RU.md)

#### EN

[](#en)

- Mapping an array of any nesting into a new array or class properties.
- Dto using attributes (ElementName, CastMethod, Cast Default).
- During the processing of the array, you can change the data using your own methods.

An example of a Dto in [Example](src%2FExample).

[Documentation](README_EN.md)

### Установка / Install

[](#установка--install)

```
"require": {
    "php": "^8.2"
  }
```

```
composer require smirnov-o/mapper

```

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance74

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Recently: every ~96 days

Total

13

Last Release

142d ago

Major Versions

1.5.3 → 2.0.02026-01-30

PHP version history (2 changes)1.0PHP ^8.0

1.3PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b9954ed8c5526e7b991fd9280f02e2a656bee860fde66ed8a65b2d9cd8b21fd?d=identicon)[smirnov-o](/maintainers/smirnov-o)

---

Top Contributors

[![smirnov-o](https://avatars.githubusercontent.com/u/16119322?v=4)](https://github.com/smirnov-o "smirnov-o (65 commits)")

---

Tags

attributesdtomapperphpphp8phpclassobjectmapperdtoattribute

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/smirnov-o-mapper/health.svg)

```
[![Health](https://phpackages.com/badges/smirnov-o-mapper/health.svg)](https://phpackages.com/packages/smirnov-o-mapper)
```

###  Alternatives

[yzen.dev/plain-to-class

Class-transformer to transform your dataset into a structured object

162101.6k6](/packages/yzendev-plain-to-class)

PHPackages © 2026

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