PHPackages                             fedejuret/dto-builder - 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. fedejuret/dto-builder

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

fedejuret/dto-builder
=====================

PHP Library to build DTO's using attributes

2.3.0(9mo ago)0212MITPHPCI failing

Since Feb 26Pushed 9mo ago1 watchersCompare

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

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

DTO Builder
===========

[](#dto-builder)

**DTO Builder** is a lightweight PHP library that streamlines the process of creating and populating Data Transfer Objects (DTOs) using PHP 8+ attributes. It enables dynamic property hydration, automatic validation, and conversion to arrays with minimal boilerplate.

---

✨ Features
----------

[](#-features)

- 📦 Instantiate DTOs from arrays
- 🧪 Attribute-based property validation
- 🖁️ Convert DTOs to arrays effortlessly
- ✅ PHP 8 attributes for configuration
- 🧹 Extendable and easy to integrate

---

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require fedejuret/dto-builder
```

---

🚀 Getting Started
-----------------

[](#-getting-started)

### 1. Define Your DTO

[](#1-define-your-dto)

```
