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

Symfony Dto Laravel Package

php-collective/symfony-dto

php-collective/symfony-dto brings typed DTOs to Symfony controllers, letting you map and validate request data into dedicated objects instead of raw arrays. It keeps request handling explicit, type-safe, and easier to maintain, with attribute-driven mapping and validation.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for typed data boundaries: symfony-dto (php-collective) lets teams declare DTOs in a PHP config file (dto.php) and generate typed objects instead of hand-writing transfer objects — directly informing whether to standardize DTOs across services or keep ad-hoc arrays/VOs.
  • API and integration contracts: Use it to shape request/response DTOs, form/command payloads, and inter-service messages, which affects API versioning and contract-testing strategy.
  • Roadmap sequencing: Adoption is only sensible on PHP/Symfony stacks; if the roadmap includes Laravel-first services, this should be deprioritized in favor of Laravel-native tooling (e.g., data-transfer packages, casts, or serializers).
  • Internal tooling and DX bets: A config-file-first DTO generator influences onboarding, code review conventions, and static analysis (PHPStan/Psalm) coverage — relevant when deciding to invest in codegen over documentation.
  • Release 0.1.4 (config format consistency to dto.php) is a housekeeping change: it reduces config drift between versions but does not introduce features, breaking changes, or deprecations. No roadmap impact; treat as routine maintenance when pinning versions.

When to Consider This Package

Consider it when:

  • The codebase is Symfony-based (or Symfony components are already in use) and the team wants declarative DTO generation from PHP config rather than annotations/attributes or manual classes.
  • You need consistent, typed data boundaries across modules and want the DTO definitions to live in version-controlled PHP config (dto.php) that is readable and diff-friendly.
  • You are comfortable running a pre-1.0 (0.1.x) dependency: expect API churn, thin documentation, and limited ecosystem support.
  • Codegen fits your workflow — generated artifacts are committed or built in CI, and static analysis gates catch drift.

Look elsewhere when:

  • The stack is Laravel-first: prefer Laravel-native DTO/data-object packages, Eloquent casts, or framework serializers that integrate with validation and request lifecycle.
  • You need stable, long-term-supported APIs (1.0+, semantic-versioning guarantees, security response commitments).
  • The team lacks capacity to own generated code, CI regeneration, and upgrades during the 0.x series.
  • Requirements are simple enough that plain readonly classes or arrays with validation suffice — codegen adds a build step and cognitive overhead for marginal gain.

How to Pitch It (Stakeholders)

For executives: symfony-dto is a small, early-stage open-source utility that generates typed data objects from a PHP config file. It can reduce boilerplate and inconsistency at service boundaries, but it is pre-1.0, single-maintainer-adjacent, and Symfony-oriented — it is a low-cost experiment, not a platform commitment. The latest release (0.1.4) is maintenance only: it standardizes on dto.php as the config format, with no new features or breaking changes. Recommendation: pilot on one non-critical Symfony service, timebox the evaluation, and keep a fallback to plain DTO classes.

For engineering: 0.1.4 aligns PHP config handling on dto.php, which reduces format drift and makes configs easier to review and diff. There are no breaking changes, so an upgrade from 0.1.3 is low-risk — pin the patch version and regenerate/verify generated output in CI. Because the project is 0.x with limited documentation, budget for reading source and owning the generation step; validate static-analysis and autoload behavior before broader rollout.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums