PHPackages                             blackbird/dto-toolkit - 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. blackbird/dto-toolkit

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

blackbird/dto-toolkit
=====================

DTO Toolkit module provides the tools for creating Data Transfer Objects (DTO) in Magento 2 while retaining Magento's key features such as plugins, preferences, etc.

1.0.1(1mo ago)3324MITPHP

Since May 20Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/blackbird-agency/dto-toolkit)[ Packagist](https://packagist.org/packages/blackbird/dto-toolkit)[ RSS](/packages/blackbird-dto-toolkit/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

dto-toolkit
===========

[](#dto-toolkit)

[![Latest Stable Version](https://camo.githubusercontent.com/a2842c9918fd6939281a110177266bf79d97ae73318199100be18393a34edd70/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e312d626c7565)](https://packagist.org/packages/blackbird/dto-toolkit)[![Total Downloads](https://camo.githubusercontent.com/3e0519a7435887e03041683312164ac0e4ab13fafc6fce052628574c7228b107/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c61636b626972642f64746f2d746f6f6c6b6974)](https://packagist.org/packages/blackbird/dto-toolkit)[![License: MIT](https://camo.githubusercontent.com/3e56017e4c8e24324ff4589e69557b5465065fa63be32c7faf79b74817a8e05b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f626c61636b626972642d6167656e63792f64746f2d746f6f6c6b69742e737667)](./LICENSE)

The Magento 2 DTO Toolkit Module provides the tools for creating Data Transfer Objects (DTO) in Magento 2 while retaining Magento's key features such as plugins, preferences, etc.

This module aims to enhance the development experience by offering a structured approach to handling data transfer within Magento applications.

[Features](#features) • [Installation](#installation) • [Usage](#usage) • [More modules](#more-modules)

Features
--------

[](#features)

- **Easy DTO Creation:** Simplifies the process of creating and managing DTOs.
- **Magento Integration:** Maintains full compatibility with Magento's DI system, plugins, and preferences.
- **Auto Hydration:** Provides a way to automatically hydrate your DTO with an array.

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

[](#installation)

> ### Requirements
>
> [](#requirements)
>
> - PHP &gt;= 7.4

```
composer require blackbird/dto-toolkit

```

```
php bin/magento setup:upgrade

```

*In production mode, do not forget to recompile and redeploy the static resources.*

Usage
-----

[](#usage)

To instantiate your DTO while maintains full compatibility with Magento 2, please use the provided DTOFactory

```
use Blackbird\DTOToolkit\Model\Factory\DTOFactory;

/** @var DTOFactory $dtoFactory **/
protected $dtoFactory;

public function __construct(
    DTOFactory $dtoFactory
) {
  $this->dtoFactory = $dtoFactory;
}

[...]

$myDtoInstance = $this->dtoFactory->create(MyDTO::class);
```

To automatically hydrate your DTO instance with an array

```
use Blackbird\DTOToolkit\Model\Factory\DTOFactory;

/** @var DTOFactory $dtoFactory **/
protected $dtoFactory;

public function __construct(
    DTOFactory $dtoFactory
) {
  $this->dtoFactory = $dtoFactory;
}

[...]

myArray = [
  'key_one' => 1,
  'key_two' => 2
];

$myDtoInstance = $this->dtoFactory->create(MyDTO::class, $myArray);
```

Warning, if your DTO class doesn't have the properties `keyOne` or `keyTwo`, they will not be hydrated.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~735 days

Total

2

Last Release

39d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12445118?v=4)[anthony-blackbird](/maintainers/anthony-blackbird)[@anthony-blackbird](https://github.com/anthony-blackbird)

---

Top Contributors

[![luderic-blackbird](https://avatars.githubusercontent.com/u/144663333?v=4)](https://github.com/luderic-blackbird "luderic-blackbird (7 commits)")[![sebastienbird](https://avatars.githubusercontent.com/u/83710445?v=4)](https://github.com/sebastienbird "sebastienbird (1 commits)")

### Embed Badge

![Health badge](/badges/blackbird-dto-toolkit/health.svg)

```
[![Health](https://phpackages.com/badges/blackbird-dto-toolkit/health.svg)](https://phpackages.com/packages/blackbird-dto-toolkit)
```

###  Alternatives

[elgentos/regenerate-catalog-urls

Regenerate Catalog URL Rewrites (products, categories, cms pages)

2842.6M](/packages/elgentos-regenerate-catalog-urls)[nosto/module-nostotagging

Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.

27703.7k4](/packages/nosto-module-nostotagging)[tig/postnl-magento2

TIG Magento 2 PostNL extension

59570.5k5](/packages/tig-postnl-magento2)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1860.2k](/packages/myparcelnl-magento)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

244.9k2](/packages/zwernemann-module-withdrawal)

PHPackages © 2026

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