Skip to content
This repository was archived by the owner on Oct 22, 2026. It is now read-only.

3.0.0

Choose a tag to compare

@brendt brendt released this 02 Apr 04:28

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]