Weave Code
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

Laravel Dto Laravel Package

open-southeners/laravel-dto

View on GitHub
Deep Wiki
Context7
3.8.0

Added

  • Laravel 13 support
3.7.0

Added

  • Laravel 12 support

Removed

  • PHP 8.1 support
  • Laravel 9 and 10 support
3.6.0

Added

  • Command make:dto now opens the file after is generated

Changed

  • extended-php dependency replaced with extended-laravel (required to use OpensGeneratedFiles trait on the make:dto command)
3.5.4

Changed

  • New dependency name replaced laravel-helpers with extended-php
3.5.3

Fixed

  • Filtering reset keys to numeric when string needed
3.5.2

Fixed

  • Filtering on collections with not null data
3.5.1

Fixed

  • Filtering on collections with not null data
3.5.0

Added

  • Improve model morph mapping sending multiple IDs and their matches types. Documentation link
3.4.0

Added

  • DataTransferObjects now have dump and dd methods

Fixed

  • toArray method not returning everything when DTOs where used on the request and later on reused. Caveat: Only one DTO per request until v4 refactor
3.3.0

Added

  • Laravel 11 support
  • Collected data transfer objects now mapped properly using fromArray
3.2.3

Fixed

  • From request context with DTO's filled method not working properly
3.2.2

Fixed

  • Route resolution on the model's logic (resolveRouteBindingQuery)
3.2.1

Fixed

  • Route binding when nested DTO is being used with same parameter key as route binding
3.2.0

Changed

  • Models route binding now uses Eloquent's Model resolveRouteBindingQuery method
  • Models uses default routing key (getRouteKeyName) only when BindModel PHP attribute doesn't have the using argument

Fixed

  • Routes binding models through DTOs now are injected back to route parameters (to be reused in every other part of the software)
3.1.3

Fixed

  • BackedEnum typed properties with union types falling back to original value
3.1.2

Fixed

  • laravel-helpers package version constraints so it doesn't conflict with any other package that uses it in the same way (or even the root project)
3.1.1

Fixed

  • Serialisation using old BindModelUsing instead of new BindModel attribute
3.1.0

Added

  • JSON strings to collections (arrays or Illuminate's Collection instances)
3.0.3

Fixed

  • Regression introduced by morphs fix using abstract Model class
3.0.2

Fixed

  • Morph binding using generic Illuminate's model class (not instantiable), fallbacks to Relation::morphMap
3.0.1

Fixed

  • Passing through with no type casting already matching typed properties (enums, objects, etc...)
2.2.1

Fixed

  • Enums parsing when one is being passed to DTOs (thanks @coclav 🎉) [#6]
3.0.0

Added

  • Morph support for data transfer objects model properties and collection properties. For e.g: public Film|Post $taggable, public string $taggableType
  • Simplificated OpenSoutheners\LaravelDto\Attributes\BindModel attribute grouping all the model binding options.
  • Support for OpenSoutheners\LaravelDto\Attributes\BindModel attribute in morph properties, which can be also used to customise the type key name. For e.g. from the same example from above:
#[BindModel(
  using: [Post::class => 'slug'],
  with: [Post::class => 'tags', Film::class => ['tags', 'posts']],
  morphTypeKey: 'tagType'
)]
public Film|Post $taggable,
public string $tagType

Changed

  • Replace all #[BindModelUsing('attribute')] to #[BindModel(using: 'attribute')] in your code (take in mind it must not be repeated under the same property)
  • Replace all #[BindModelWith(['relation1', 'relation2'])] to #[BindModel(with: ['relation1', 'relation2'])] in your code (take in mind it must not be repeated under the same property)
2.2.0

Added

  • OpenSoutheners\LaravelDto\Attributes\WithDefaultValue attribute to set default value
  • #[WithDefaultValue(Authenticatable::class)] will set as default value the authenticated user (Auth::user())
2.1.1

Fixed

  • Now \stdClass properties get properly serialised as multidimensional arrays
2.1.0

Added

  • TypeScript .d.ts generation command with --declarations option

Changed

  • Default TypeScript types generation command options now have some of them on the config file

Fixed

  • Config file now is exposed to be published using vendor:publish --provider="OpenSoutheners\\LaravelDto\\ServiceProvider" or vendor:publish --tag="config" commands
  • Non typed properties when nullable or not while TypeScript types generation
2.0.1

Fixed

  • Keys normalisation on types generator (snake case when enabled from config)
  • Types generator when empty collections
2.0.0

Added

  • Serialisation for DTO objects so now they can be sent to queued jobs
  • dto:typescript command for generating TypeScript types based on your application's DTOs
1.10.11

Fixed

  • Sending multiple values (for e.g. 1,2,5) on a collection with BindModelUsing attribute or custom model's getRouteKeyName method now works querying all models
  • make:dto command now does not generate a ValidatedDataTransferObject with request static method on it
1.10.10

Fixed

  • Request option for make:dto command when sent without a value fails
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope