Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed Oct 16, 2023
1 parent 48b7473 commit 3c5f84c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.0.0] - 2023-10-16

### 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:

```php
#[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] - 2023-10-16

### Added
Expand Down

0 comments on commit 3c5f84c

Please sign in to comment.