solido/dto-management
Manage, discover, and enhance DTOs in PHP apps with Solido DTO Management. Provides tools to register and locate DTO classes and apply enhancements consistently across your codebase. Documentation and contribution guides available.
FormRequest) or serialization (e.g., JSON API, GraphQL)?Resource classes or manually map DTOs to JSON responses.laravel-graphql to define versioned input/output types.v1/UserProfileDTO).deprecated() attribute or API deprecation headers.spatie/array-to-object or custom serializers if needed.composer require solido/dto-management.php artisan vendor:publish --provider="Solido\DtoManagement\DtoManagementServiceProvider".app/Dtos/v1/UserProfileDTO.php) extending Solido\DtoManagement\Dto.@DtoVersion("1.0") and @DtoProperty.$this->app->register(Solido\DtoManagement\DtoManagementServiceProvider::class);
use Solido\DtoManagement\Facades\Dto;
$dto = Dto::create(UserProfileDTO::class, $rawData);
return response()->json($dto);
/api/v1/users) or headers (Accept: application/vnd.company.v1+json).solido/dto-management for breaking changes (low risk given MIT license).Dto::validate() to catch issues early.Dto::resolvedVersion()).Dto::resolve()).Dto::validate() and automated tests for schema changes.How can I help you explore Laravel packages today?