Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Releases: spatie/data-transfer-object

3.0.4

14 Apr 09:38
Compare
Choose a tag to compare
  • Support union types (#185)
  • Resolve default cast from parent classes (#189)
  • Support default values (#191)

3.0.3

08 Apr 10:56
Compare
Choose a tag to compare
  • Fix when nested DTO have casted field (#178)

3.0.2

02 Apr 07:39
Compare
Choose a tag to compare
  • Allow valid DTOs to be passed to caster (#177)

3.0.1

02 Apr 07:20
Compare
Choose a tag to compare
  • Fix for null values with casters (#176)

3.0.0

02 Apr 04:28
Compare
Choose a tag to compare

This package now focuses only on object creation by adding easy-to-use casting and data validation functionality. All runtime type checks are gone in favour of the improved type system in PHP 8.

  • Require php:^8.0
  • Removed all runtime type checking functionality, you should use typed properties and a static analysis tool like Psalm or PhpStan
  • Removed Spatie\DataTransferObject\DataTransferObjectCollection
  • Removed Spatie\DataTransferObject\FlexibleDataTransferObject, all DTOs are now considered flexible
  • Removed runtime immutable DTOs, you should use static analysis instead
  • Added Spatie\DataTransferObject\Validator
  • Added Spatie\DataTransferObject\Validation\ValidationResult
  • Added #[DefaultCast]
  • Added #[CastWith]
  • Added Spatie\DataTransferObject\Caster
  • Added #[Strict]

2.8.3

12 Feb 08:47
2625a59
Compare
Choose a tag to compare
  • Add support for using collection internally

2.8.2

11 Feb 08:20
d53fca4
Compare
Choose a tag to compare

This might be a breaking change but it was required for a bugfix

  • Prevent DataTransferObjectCollection from iterating over array copy (#166)

2.8.1

10 Feb 12:24
Compare
Choose a tag to compare
  • Fix for invalid return type #164

2.8.0

27 Jan 15:08
Compare
Choose a tag to compare
  • Allow the traversal of collections with string keys

2.7.0

21 Jan 13:50
Compare
Choose a tag to compare
Merge pull request #117 from morrislaptop/cast-nested-collections

Cast nested collections