PHPackages                             bigyohann/symfony-dto-bundle - 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. bigyohann/symfony-dto-bundle

AbandonedArchivedSymfony-bundle[Utility &amp; Helpers](/categories/utility)

bigyohann/symfony-dto-bundle
============================

Symfony bundle to add automatic Dto converter

2.0.1(3y ago)0128MITPHPPHP &gt;=8.1

Since Sep 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Bigyohann/Symfony-Dto-Bundle)[ Packagist](https://packagist.org/packages/bigyohann/symfony-dto-bundle)[ RSS](/packages/bigyohann-symfony-dto-bundle/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (5)Dependencies (6)Versions (7)Used By (0)

Symfony DTO Bundle
==================

[](#symfony-dto-bundle)

Motivation
----------

[](#motivation)

- Create and deploy a lib to packagist
- Create a bundle for Symfony
- Facilitate the way of handle serializing

Usage
-----

[](#usage)

Extends your Dto class from `Bigyohann\DtoBundle\Dto\Dto`, make all your properties private and add getter.

By default, I add a convert function to automatically set Dto properties to object passed as parameter.

You can annotate your property with attribute `Bigyohann\DtoBundle\Attributes\ConvertProperty` and if parameter `shouldConvertAutomatically` is set at false, property will not be mapped to object passed as parameter, but you can still access it in Dto if you want to do a specific action with this value.

if you don't want to use convert function, you can use `Bigyohann\DtoBundle\Dto\DtoInterface`.

Exemple
-------

[](#exemple)

```
use Bigyohann\DtoBundle\Attributes\ConvertProperty;
use Bigyohann\DtoBundle\Dto\Dto;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\Type;

class UserDto extends Dto
{
    #[ConvertProperty]
    #[Type(type: 'string')]
    #[Length(min: 2, max: 20)]
    private ?string $name;

    #[ConvertProperty(shouldConvertAutomatically: false)]
    #[Type(type: 'string')]
    private ?string $password;

    public function getPassword(): ?string
    {
        return $this->password;
    }

    public function getName(): ?string
    {
        return $this->name;
    }

}
```

Inject Dto directly in Controller functions

```
    public function create(UserDto $dto){
        $user = new User();

        $dto->transformToObject($user);

        // password is not automatically convert in $user, do your custom logic with $dto->getPassword()
        // Add your custom logic here
    }
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~41 days

Total

5

Last Release

1229d ago

Major Versions

1.2 → 2.02023-01-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/b7e79716a48cca124563e784e9b4126b731a57a7a842b5b7ffb4e2bdbd912b67?d=identicon)[Bigyohann](/maintainers/Bigyohann)

---

Top Contributors

[![Bigyohann](https://avatars.githubusercontent.com/u/28597040?v=4)](https://github.com/Bigyohann "Bigyohann (9 commits)")

### Embed Badge

![Health badge](/badges/bigyohann-symfony-dto-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/bigyohann-symfony-dto-bundle/health.svg)](https://phpackages.com/packages/bigyohann-symfony-dto-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M572](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)

PHPackages © 2026

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