This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
3.0.0
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]