NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1090 most downloaded on Packagist
Data transfer objects with batteries included
Last release 4 years ago
no release in 18 months
Release timing varies
gaps range from 8 days to 5 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
68 releases · first in 2018
Add test for "Cannot use positional argument after named argument during unpacking" error by @Kehet in #302
Full Changelog: 3.9.0...3.9.1
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.9.0...3.9.1
One column per quarter.
allow enum casting not only enum value casting by @regnerisch in #301
Full Changelog: 3.8.1...3.9.0
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.8.1...3.9.0
Fixed bug #249 by @gerpo in #251
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.8.0...3.8.1
Added enum caster by @Elnadrion in #277
Full Changelog: 3.7.3...3.8.0
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.7.3...3.8.0
Stop suggesting phpstan/phpstan by @ymilin in #264
Full Changelog: 3.7.2...3.7.3
#[Strict] is passed down the inheritance chain so children are strict when parent is strict
#[Strict] is passed down the inheritance chain so children are strict when parent is strict (#239)Cast properties with self or parent type
- Add #[MapTo] support
#[MapTo] support (#233)Correct behavior of Arr::forget with dot keys
Fix array assignment bug with strict dto's
- Support mapped properties
- Support union types in casters
Fix for an empty value being created when casting ArrayAccess objects
ArrayAccess objects (#216)ArrayAccess objects that are not traversable (#216)ArrayCaster to retain values that are already instances of the itemType (#217)Expose DTO and validation error array in ValidationException
Add casting of objects that implement ArrayAccess to the ArrayCaster
ArrayCasterArrayAccess to the ArrayCaster (#206)- Make DefaultCast repeatable
DefaultCast repeatable (#202)Add DataTransferObject::clone(...$args)
DataTransferObject::clone(...$args)Resolve default cast from parent classes
Fix when nested DTO have casted field
Allow valid DTOs to be passed to caster
Fix for null values with casters
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
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]Fix deprecation warnings on PHP 8.1 by @Nielsvanpach in #260
Full Changelog: 2.8.3...2.8.4
Add support for using collection internally
collection internallyThis might be a breaking change, but it was required for a bugfix
This might be a breaking change, but it was required for a bugfix
- Fix for incorrect return type
Allow the traversal of collections with string keys
- Cast nested collections
- Support PHP 8
- Group type errors
- Support for array syntax
array<int, string> syntax (#136)Add PHPStan extension to support checkUninitializedProperties: true
checkUninitializedProperties: true (#135)Validator for typed 7.4 properties
Add support for typed properties to DTO casting in PHP 7.4
Nothing published for this version
Bump minimum required PHP version to 7.4
Support PHP 8.1 Full Changelog : 1.14.0...1.14.1
Full Changelog: 1.14.0...1.14.1
Support PHP ^8.0
Ignore static properties when serializing
DataTransferObjectError::invalidType : get actual type before mutating $value for the error message
- Improve extendability of DTOs
Add DataTransferObject::arrayOf
DataTransferObject::arrayOf (#83)Improved performance by adding a cache
FlexibleDataTransferObject which allows for unknown properties to be ignoredAdd iterable and iterable<\Type> support
iterable and iterable<\Type> supportAllow a DTO to be constructed without an array
- Improve type error message
Add DataTransferObjectCollection::items()
- Support immutability
Fixes #47, allowing empty dto's to be cast to using an empty array.
Nested array DTO casting supported.
- Properly support float.
float.Fix uninitialised error with default value.
- Don't use allValues anymore.
allValues anymore.Support nested collections in collections
Remove too much magic in nested array casting
Support nested toArray in collections.
toArray in collections.- Support nested toArray.
toArray.- Add strict type declarations
Add auto casting of nested DTOs
- Rename to data-transfer-object
Your coding agent can read these notes before it upgrades. Set up the MCP server →