PHPackages                             rinsvent/data2dto - 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. rinsvent/data2dto

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

rinsvent/data2dto
=================

Convert data to dto object

v0.0.18(4y ago)02845MITPHPPHP ^8.0

Since Aug 8Pushed 4y ago1 watchersCompare

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

READMEChangelogDependencies (6)Versions (19)Used By (5)

[![pipeline status](https://camo.githubusercontent.com/a4532d8f080f13b9b2a832a63a8e05d859623b1f7b205d8af77c2b02986b8158/68747470733a2f2f6769742e72696e7376656e742e72752f72696e7376656e742f646174613264746f2f6261646765732f6d61737465722f706970656c696e652e737667)](https://git.rinsvent.ru/rinsvent/data2dto/-/commits/master)[![coverage report](https://camo.githubusercontent.com/dc7172c57dda0dbb4da9dec73b3ec53615573a23ad563844daa003cd8b3e33c4/68747470733a2f2f6769742e72696e7376656e742e72752f72696e7376656e742f646174613264746f2f6261646765732f6d61737465722f636f7665726167652e737667)](https://git.rinsvent.ru/rinsvent/data2dto/-/commits/master)

Data2dto
========

[](#data2dto)

Установка
---------

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

```
composer require rinsvent/data2dto
```

Пример
------

[](#пример)

### Описания ДТО

[](#описания-дто)

```
class BuyRequest
{
    public string $phrase;
    public int $length;
    public bool $isFirst;
}

interface BarInterface
{

}

class Bar implements BarInterface
{
    public float $barField;
}

class HelloRequest
{
    #[Trim]
    public string $surname;
    #[PropertyPath('fake_age')]
    public int $age;
    public array $emails;
    #[DTOMeta(class: Author::class)]
    public array $authors;
    public BuyRequest $buy;
    #[DTOMeta(class: Bar::class)]
    public BarInterface $bar;
}
```

### Использование

[](#использование)

```
use Rinsvent\Data2DTO\Data2DtoConverter;

$data2DtoConverter = new Data2DtoConverter();
$dto = $data2DtoConverter->convert([
    'surname' => '   asdf',
    'fake_age' => 3,
    'emails' => [
        'sfdgsa',
        'af234f',
        'asdf33333'
    ],
    'authors' => [
        [
            'name' => 'Tolkien',
        ],
        [
            'name' => 'Sapkovsky'
        ]
    ],
    'buy' => [
        'phrase' => 'Buy buy!!!',
        'length' => 10,
        'isFirst' => true,
        'extraData2' => '1234'
    ],
    'bar' => [
        'barField' => 32
    ],
    'extraData1' => 'qwer'
], new HelloRequest);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% 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 ~14 days

Recently: every ~56 days

Total

18

Last Release

1503d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22261086?v=4)[rinsvent](/maintainers/rinsvent)[@Rinsvent](https://github.com/Rinsvent)

---

Top Contributors

[![rinsvent007](https://avatars.githubusercontent.com/u/183840611?v=4)](https://github.com/rinsvent007 "rinsvent007 (21 commits)")[![sipachev](https://avatars.githubusercontent.com/u/162081332?v=4)](https://github.com/sipachev "sipachev (12 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/rinsvent-data2dto/health.svg)

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

###  Alternatives

[phing/phing

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

1.2k21.7M876](/packages/phing-phing)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k51](/packages/flow-php-etl)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)

PHPackages © 2026

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