{"id":15045045,"url":"https://github.com/dualmediaspzoo/symfony-request-dto-bundle","last_synced_at":"2026-04-23T08:00:47.639Z","repository":{"id":65145453,"uuid":"575417286","full_name":"dualmediaspzoo/symfony-request-dto-bundle","owner":"dualmediaspzoo","description":"A Symfony DTO request bundle to allow easier data input and validation on controllers","archived":false,"fork":false,"pushed_at":"2026-04-17T08:23:49.000Z","size":547,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-04-17T08:29:58.434Z","etag":null,"topics":["doctrine","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dualmediaspzoo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-07T13:19:07.000Z","updated_at":"2026-03-26T18:09:15.000Z","dependencies_parsed_at":"2024-09-25T01:55:36.378Z","dependency_job_id":"f7cbbce2-3b48-4038-bea2-361873364ac8","html_url":"https://github.com/dualmediaspzoo/symfony-request-dto-bundle","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"fe87e7e8cec205d5b5c7e286df77d0eafc010e95"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/dualmediaspzoo/symfony-request-dto-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dualmediaspzoo%2Fsymfony-request-dto-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dualmediaspzoo%2Fsymfony-request-dto-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dualmediaspzoo%2Fsymfony-request-dto-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dualmediaspzoo%2Fsymfony-request-dto-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dualmediaspzoo","download_url":"https://codeload.github.com/dualmediaspzoo/symfony-request-dto-bundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dualmediaspzoo%2Fsymfony-request-dto-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32171223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T02:19:40.750Z","status":"ssl_error","status_checked_at":"2026-04-23T02:17:55.737Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["doctrine","php","symfony","symfony-bundle"],"created_at":"2024-09-24T20:51:23.290Z","updated_at":"2026-04-23T08:00:47.631Z","avatar_url":"https://github.com/dualmediaspzoo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Symfony DTO Bundle\n\n[![Packagist Downloads](https://img.shields.io/packagist/dt/dualmedia/symfony-request-dto-bundle)](https://packagist.org/packages/dualmedia/symfony-request-dto-bundle)\n\nThis bundle aims to lower the burden of typechecking, casting, loading entities\nand related annoyances of using requests in your api.\n\nBundle will automatically hook into [Doctrine ORM Bundle](https://github.com/doctrine/DoctrineBundle) and [Nelmio API Docs Bundle](https://github.com/nelmio/NelmioApiDocBundle) so no additional configuration should be needed.\n\n## Features\n\n- Automatic DTO resolution from controller arguments — no manual extraction, casting, or validation wiring\n- Type coercion for scalars, enums (backed or by case name), dates, and uploaded files\n- Doctrine entity loading directly from request fields (`#[FindOneBy]`, `#[FindBy]`)\n- Validator integration — Symfony constraints on properties and fields are enforced in a single pass\n- Nested DTOs, collections of DTOs, and `#[AsRoot]` for flat top-level payloads\n- Nelmio API Doc integration — parameters, request bodies, enum cases, formats, and PHPDoc descriptions are described automatically\n- Configurable request bags (query, body, headers, cookies, attributes, files) via `#[Bag]`\n- Configurable custom `#[Action]`s for fields, entities and more. Set custom responses via an easy to handle event.\n- Event hooks for resolved / invalid / action scenarios — return custom responses from listeners\n- Symfony profiler panel with per-request DTO resolution timings\n- Cached metadata via opcache-backed PHP files — near-zero reflection cost after warm-up\n\n## Install\n\n```\ncomposer require dualmedia/symfony-request-dto-bundle\n```\n\nThen add the bundle to your `config/bundles.php` file like so\n\n```php\nreturn [\n    Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle::class =\u003e ['all' =\u003e true],\n    // other bundles ...\n    DualMedia\\DtoRequestBundle\\DtoBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\nIf applicable your Doctrine entity managers will be detected automatically and used as default providers for classes to be loaded with your requests if needed.\n\n## Quick start\n\n```php\nuse DualMedia\\DtoRequestBundle\\Dto\\AbstractDto;\nuse DualMedia\\DtoRequestBundle\\Dto\\Attribute\\Bag;\nuse DualMedia\\DtoRequestBundle\\Metadata\\Enum\\BagEnum;\nuse Symfony\\Component\\HttpFoundation\\File\\UploadedFile;\n\n// input:\n// [\n//     'name' =\u003e 'John',\n//     'age' =\u003e '25',\n//     'score' =\u003e '9.5',\n//     'active' =\u003e '1',\n//     'avatar' =\u003e \u003cUploadedFile\u003e,\n// ]\n\nclass ProfileDto extends AbstractDto\n{\n    public string|null $name = null;\n\n    public int|null $age = null;\n\n    public float|null $score = null;\n\n    public bool|null $active = null;\n\n    #[Bag(BagEnum::Files)]\n    public UploadedFile|null $avatar = null;\n}\n```\n\n## More examples\n\nSee [EXAMPLES.md](EXAMPLES.md) for enums, dates, nested DTOs, entity loading, and root-level payloads.\n\n## Upgrades\n\nSee [CHANGES.md](CHANGES.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdualmediaspzoo%2Fsymfony-request-dto-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdualmediaspzoo%2Fsymfony-request-dto-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdualmediaspzoo%2Fsymfony-request-dto-bundle/lists"}