Releases: open-southeners/laravel-dto
Releases · open-southeners/laravel-dto
1.4.0
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
toworkspace
,post_tags
topostTags
, etc) to package config file (publish using commandphp 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
Changed
DataTransferObject::fromArray
now usesinitialize
method instead ofwithDefaults
(internal change, shouldn't affect anything)
1.3.0
Changed
DataTransferObject::filled
method refactored with better logic
1.2.0
Added
DataTransferObject::fromRequest()
method shortcut (does same asDataTransferObject::fromArray($request->validated())
orDataTransferObject::fromArray($request->all())
)
1.1.0
Added
make:dto
command to generate data transfer object classes
1.0.0
Added
- Initial release!