Data Transfer Object Versions Save

Data transfer objects with batteries included

3.0.4

3 years ago
  • Support union types (#185)
  • Resolve default cast from parent classes (#189)
  • Support default values (#191)

3.0.3

3 years ago
  • Fix when nested DTO have casted field (#178)

3.0.2

3 years ago
  • Allow valid DTOs to be passed to caster (#177)

3.0.1

3 years ago

3.0.0

3 years ago

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

3 years ago
  • Add support for using collection internally

2.8.2

3 years ago

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

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

2.8.1

3 years ago
  • Fix for invalid return type #164

2.8.0

3 years ago
  • Allow the traversal of collections with string keys

2.7.0

3 years ago