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(3y ago)03.9k[1 PRs](https://github.com/brokeyourbike/data-transfer-object-php/pulls)20MPL-2.0PHPPHP ^8.0CI failing

Since Dec 18Pushed 3y 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 today

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

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity49

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

1145d 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

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k28.0M312](/packages/openai-php-client)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M156](/packages/algolia-algoliasearch-client-php)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60216.0M83](/packages/mollie-mollie-api-php)[theodo-group/llphant

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

1.7k409.0k6](/packages/theodo-group-llphant)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)

PHPackages © 2026

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