spatie/value-object
Deprecated Spatie package for PHP 8+ data transfer objects. Create typed DTOs from arrays with casting, validation, and attribute mapping (e.g., nested keys). Consider migrating to spatie/laravel-data or cuyz/valinor.
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.9.0...3.9.1
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.8.1...3.9.0
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.8.0...3.8.1
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.7.3...3.8.0
#[Strict] is passed down the inheritance chain so children are strict when parent is strict (#239)#[MapTo] support (#233)ArrayAccess objects (#216)ArrayAccess objects that are not traversable (#216)ArrayCaster to retain values that are already instances of the itemType (#217)ArrayCasterArrayAccess to the ArrayCaster (#206)DefaultCast repeatable (#202)DataTransferObject::clone(...$args)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.
php:^8.0Spatie\DataTransferObject\DataTransferObjectCollectionSpatie\DataTransferObject\FlexibleDataTransferObject, all DTOs are now considered flexibleSpatie\DataTransferObject\ValidatorSpatie\DataTransferObject\Validation\ValidationResult#[DefaultCast]#[CastWith]Spatie\DataTransferObject\Caster#[Strict]collection internallyThis might be a breaking change, but it was required for a bugfix
array<int, string> syntax (#136)checkUninitializedProperties: true (#135)DataTransferObject::arrayOf (#83)FlexibleDataTransferObject which allows for unknown properties to be ignorediterable and iterable<\Type> supportfloat.allValues anymore.toArray in collections.toArray.Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.7.2...3.7.3
How can I help you explore Laravel packages today?