Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Dto Generator Bundle Laravel Package

svb/dto-generator-bundle

A Symfony bundle that generates typed DTO classes from your entities, arrays, or config, complete with constructors, getters, setters, and mapping helpers. A console command lets you scaffold and regenerate DTOs quickly, reducing boilerplate in your service and API layers.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API boundary design: decides whether request/response payloads are typed objects or ad-hoc arrays — a decision that affects validation, serialization, and contract stability for every endpoint.
  • Build vs. buy vs. generate: gives the team a third option between hand-writing DTOs and adopting a runtime mapping library (spatie/laravel-data, jolicode/automapper, symfony/serializer). Codegen trades runtime magic for explicit, readable classes.
  • Domain/transport separation: makes it cheap to enforce that Eloquent models or Doctrine entities never leave the application layer, which is usually the real driver behind DTO adoption.
  • Roadmap costing for API versioning / contract testing: if per-endpoint DTO boilerplate drops, initiatives like OpenAPI-first design or schema-diff CI become materially cheaper to fund.
  • Use cases: retrofitting typed DTOs onto a legacy codebase, scaffolding a large CRUD surface, standardizing microservice payloads, or generating DTOs from an existing schema as the source of truth.

When to Consider This Package

Adopt when:

  • The stack is Symfony — the Bundle suffix and the vendor namespace indicate a Symfony bundle, not a Laravel package. Confirm before spending evaluation time.
  • The team has already committed to a DTO convention and the boilerplate cost is measurable (roughly 20+ endpoints, or repeated multi-field payloads).
  • You are prepared to vendor or fork it. With 0 stars, 0 dependents, and no ecosystem signal, you are the maintainer. MIT licensing makes that legally trivial; the cost is engineering time, not procurement.
  • A schema-first workflow exists (OpenAPI/JSON Schema) that the generator can consume, so output is reproducible rather than hand-tuned.
  • You can commit generated code and review the diffs in PRs, with the generator version pinned in CI.

Look elsewhere when:

  • The team is Laravel-first. Framework mismatch in serializer, validation, and container conventions will cost more than the boilerplate it saves.
  • You need runtime behavior — hydration, nested object mapping, validation. A generator is a dev-time scaffolding tool, not a mapping layer; it will not replace one.
  • Your surface area is small. Under ~15 endpoints the boilerplate simply is not the bottleneck.
  • There is no appetite for owning an unmaintained dependency, or you operate under compliance requirements that assume an active security-response channel. There is no evidence of one here.

How to Pitch It (Stakeholders)

For executives: This is a low-cost experiment, not a platform bet. It is MIT-licensed and free, and the output is plain PHP classes — if the tool is abandoned, nothing breaks and nothing needs rewriting. The upside is less hand-written boilerplate and fewer shape-mismatch bugs at API boundaries. The risk is maintenance: zero stars and zero dependents mean no external adoption signal, so it should be framed as an in-house utility with a named owner, not a dependency we rely on.

For engineering: Treat it as a codegen step in CI, not a library. Pin the version, commit the generated DTOs so every change is a reviewable diff, and keep the ability to hand-write or hand-edit classes when the generator falls short. Exit cost is deliberately near zero — that low lock-in is the actual selling point, more than the feature set. A one-to-two-day spike against three or four representative endpoints will tell us whether the output matches our conventions closely enough to be worth the CI plumbing; if it does not, we stop there and lose the spike.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource