Skip to content

Releases: open-southeners/laravel-dto

1.4.0

26 Apr 11:47
deeab37
Compare
Choose a tag to compare

Added

  • Introducing mapped types using docblock @param type like the following: @param array<\App\Models\MyModel> $models or @param \Illuminate\Support\Collection<\App\Models\MyModel> $models
  • Optional normalisation option for properties names (workspace_id to workspace, post_tags to postTags, etc) to package config file (publish using command php artisan vendor:publish --provider="OpenSoutheners\LaravelDto\ServiceProvider")
  • Attribute OpenSoutheners\LaravelDto\Attributes\NormaliseProperties to use in some DTO classes that needs properties normalisation (when globally disabled from config)
  • Attribute OpenSoutheners\LaravelDto\Attributes\BindModelWith to bind to model with relationships included

Changed

  • Now using symfony/property-info for better property assertion (so many bugs and inconsistencies on promoted properties in PHP8+ assertions)

1.3.1

21 Mar 15:39
d69e5d0
Compare
Choose a tag to compare

Changed

  • DataTransferObject::fromArray now uses initialize method instead of withDefaults (internal change, shouldn't affect anything)

1.3.0

17 Mar 11:32
415eff5
Compare
Choose a tag to compare

Changed

  • DataTransferObject::filled method refactored with better logic

1.2.0

16 Mar 15:42
9f679d2
Compare
Choose a tag to compare

Added

  • DataTransferObject::fromRequest() method shortcut (does same as DataTransferObject::fromArray($request->validated()) or DataTransferObject::fromArray($request->all()))

1.1.0

16 Mar 11:27
ae60aa8
Compare
Choose a tag to compare

Added

  • make:dto command to generate data transfer object classes

1.0.0

16 Mar 10:52
70fd934
Compare
Choose a tag to compare

Added

  • Initial release!