PHPackages                             brokeyourbike/data-transfer-object - 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. [API Development](/categories/api)
4. /
5. brokeyourbike/data-transfer-object

ActiveLibrary[API Development](/categories/api)

brokeyourbike/data-transfer-object
==================================

Return original response alongside with the DataTransferObject

0.2.1(2y ago)03.9k[1 PRs](https://github.com/brokeyourbike/data-transfer-object-php/pulls)20MPL-2.0PHPPHP ^8.0

Since Dec 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/brokeyourbike/data-transfer-object-php)[ Packagist](https://packagist.org/packages/brokeyourbike/data-transfer-object)[ RSS](/packages/brokeyourbike-data-transfer-object/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (5)Dependencies (5)Versions (6)Used By (20)

data-transfer-object
====================

[](#data-transfer-object)

[![Latest Stable Version](https://camo.githubusercontent.com/e1f617017eb3825bb6a4f60b11a579126b59e5fce9e9441ba047c6e2cf93458d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f62726f6b65796f757262696b652f646174612d7472616e736665722d6f626a6563742d706870)](https://github.com/brokeyourbike/data-transfer-object-php/releases)[![Total Downloads](https://camo.githubusercontent.com/36f0a7c76ef2825f552ec32fc7b5f95f0711e48b8ba0686b1c240db4faa15bd4/68747470733a2f2f706f7365722e707567782e6f72672f62726f6b65796f757262696b652f646174612d7472616e736665722d6f626a6563742f646f776e6c6f616473)](https://packagist.org/packages/brokeyourbike/data-transfer-object)[![Maintainability](https://camo.githubusercontent.com/b8b9b9cadfb8d45471b6c202a52b875feebec74cb7ab20531dbcf30c7dfc151a/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31373630336566346236313461633739656135382f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/brokeyourbike/data-transfer-object-php/maintainability)[![Test Coverage](https://camo.githubusercontent.com/6d192527d067130e1ad15354cabcd89ffe75dec516a163c15db475a9a0c25ab7/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31373630336566346236313461633739656135382f746573745f636f766572616765)](https://codeclimate.com/github/brokeyourbike/data-transfer-object-php/test_coverage)

Return original response alongside with the [data transfer object](https://github.com/spatie/data-transfer-object)

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

[](#installation)

```
composer require brokeyourbike/data-transfer-object
```

Usage
-----

[](#usage)

```
use BrokeYourBike\DataTransferObject\JsonResponse;

class SomeDTO extends JsonResponse
{
    public string $name;
}

assert($response instanceof ResponseInterface);

$dto = new SomeDTO($response);

assert($response === $dto->getRawResponse());
```

Authors
-------

[](#authors)

- [Ivan Stasiuk](https://github.com/brokeyourbike) | [Twitter](https://twitter.com/brokeyourbike) | [LinkedIn](https://www.linkedin.com/in/brokeyourbike) | [stasi.uk](https://stasi.uk)

License
-------

[](#license)

[Mozilla Public License v2.0](https://github.com/brokeyourbike/data-transfer-object-php/blob/main/LICENSE)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~170 days

Total

4

Last Release

1090d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/114f3c6e8506e0bba763451e8e4bcc3e94d662c2dce982a910b5d7b3444593cf?d=identicon)[brokeyourbike](/maintainers/brokeyourbike)

---

Top Contributors

[![brokeyourbike](https://avatars.githubusercontent.com/u/1554371?v=4)](https://github.com/brokeyourbike "brokeyourbike (16 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

dtodto-entity-mapperdto-patternhacktoberfestphpphp8responseapidata-transfer-objectBrokeYourBike

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brokeyourbike-data-transfer-object/health.svg)

```
[![Health](https://phpackages.com/badges/brokeyourbike-data-transfer-object/health.svg)](https://phpackages.com/packages/brokeyourbike-data-transfer-object)
```

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69333.0M113](/packages/algolia-algoliasearch-client-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[mozex/anthropic-php

Anthropic PHP is a supercharged community-maintained PHP API client that allows you to interact with Anthropic API.

46365.1k13](/packages/mozex-anthropic-php)[comgate/sdk

Comgate PHP SDK

13327.8k](/packages/comgate-sdk)[darthsoup/php-whmcs-api

WHMCS API client for PHP

2317.3k4](/packages/darthsoup-php-whmcs-api)

PHPackages © 2026

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