spatie/data-transfer-object
Abandoned; use spatie/laravel-data. Data transfer objects with batteries included
3.9.1
31M downloads/mo
#1006 most downloaded on Packagist
spatie/data-transfer-object
What this package is like to depend on
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 63 of 68 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
68 releases · first in 2018
0 releases in the last 12 months
see the full history below
Release timeline
68 releases · Oct 2018 to Sep 2022Releases
latest 60 of 68-
3.9.116 Sep 2022Release notes
Open source →What's Changed
- Add test for "Cannot use positional argument after named argument during unpacking" error by @Kehet in #302
- Fix positional after named by @aidan-casey in #304
New Contributors
Full Changelog: 3.9.0...3.9.1
Release notes
Open source →What's Changed
- Add test for "Cannot use positional argument after named argument during unpacking" error by @Kehet in https://github.com/spatie/data-transfer-object/pull/302
- Fix positional after named by @aidan-casey in https://github.com/spatie/data-transfer-object/pull/304
New Contributors
- @Kehet made their first contribution in https://github.com/spatie/data-transfer-object/pull/302
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.9.0...3.9.1
-
3.9.014 Sep 2022Release notes
Open source →What's Changed
- allow enum casting not only enum value casting by @regnerisch in #301
New Contributors
- @regnerisch made their first contribution in #301
Full Changelog: 3.8.1...3.9.0
Release notes
Open source →What's Changed
- allow enum casting not only enum value casting by @regnerisch in https://github.com/spatie/data-transfer-object/pull/301
New Contributors
- @regnerisch made their first contribution in https://github.com/spatie/data-transfer-object/pull/301
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.8.1...3.9.0
-
3.8.102 Jun 2022Release notes
Open source →Release notes
Open source →What's Changed
- Fixed bug #249 by @gerpo in https://github.com/spatie/data-transfer-object/pull/251
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.8.0...3.8.1
-
3.8.002 Jun 2022Release notes
Open source →What's Changed
- Added enum caster by @Elnadrion in #277
New Contributors
- @Raja-Omer-Mustafa made their first contribution in #271
- @Elnadrion made their first contribution in #277
Full Changelog: 3.7.3...3.8.0
Release notes
Open source →What's Changed
- Added enum caster by @Elnadrion in https://github.com/spatie/data-transfer-object/pull/277
New Contributors
- @Raja-Omer-Mustafa made their first contribution in https://github.com/spatie/data-transfer-object/pull/271
- @Elnadrion made their first contribution in https://github.com/spatie/data-transfer-object/pull/277
Full Changelog: https://github.com/spatie/data-transfer-object/compare/3.7.3...3.8.0
-
3.7.330 Dec 2021Release notes
Open source →What's Changed
New Contributors
- @sergiy-petrov made their first contribution in #246
- @damms005 made their first contribution in #255
- @ymilin made their first contribution in #264
Full Changelog: 3.7.2...3.7.3
-
3.7.217 Sep 2021Release notes
Open source →#[Strict]is passed down the inheritance chain so children are strict when parent is strict (#239)
Release notes
Open source →#[Strict]is passed down the inheritance chain so children are strict when parent is strict (#239)
-
3.7.109 Sep 2021 -
3.7.026 Aug 2021 -
3.6.225 Aug 2021 -
3.6.117 Aug 2021 -
3.6.012 Aug 2021 -
3.5.011 Aug 2021 -
3.4.010 Aug 2021Release notes
Open source →- Fix for an empty value being created when casting
ArrayAccessobjects (#216) - Add logic exception when attempting to cast
ArrayAccessobjects that are not traversable (#216) - Allow the
ArrayCasterto retain values that are already instances of theitemType(#217)
- Fix for an empty value being created when casting
-
3.3.001 Jun 2021 -
3.2.031 May 2021Release notes
Open source →- Support generic casters (#199)
- Add
ArrayCaster - Add casting of objects that implement
ArrayAccessto theArrayCaster(#206) - Fix for caster subclass check (#204)
-
3.1.126 Apr 2021 -
3.1.021 Apr 2021 -
3.0.414 Apr 2021Release notes
Open source →- Support union types (#185)
- Resolve default cast from parent classes (#189)
- Support default values (#191)
-
3.0.308 Apr 2021 -
3.0.202 Apr 2021 -
3.0.102 Apr 2021 -
3.0.002 Apr 2021Release notes
Open source →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]
- Require
-
2.8.407 Dec 2021Release notes
Open source →What's Changed
- Added tests for automatic casting of nullable nested array DTOs by @pikant in #168
- Add Laravel Castable Data Transfer Object to External Tools section by @jessarcher in #170
- Fix deprecation warnings on PHP 8.1 by @Nielsvanpach in #260
New Contributors
- @pikant made their first contribution in #168
- @jessarcher made their first contribution in #170
Full Changelog: 2.8.3...2.8.4
-
2.8.312 Feb 2021 -
2.8.211 Feb 2021Release notes
Open source →This might be a breaking change, but it was required for a bugfix
- Prevent DataTransferObjectCollection from iterating over array copy (#166)
-
2.8.110 Feb 2021 -
2.8.027 Jan 2021 -
2.7.021 Jan 2021 -
2.6.026 Nov 2020 -
2.5.028 Aug 2020 -
2.4.028 Aug 2020 -
2.3.019 Aug 2020Release notes
Open source →- Add PHPStan extension to support
checkUninitializedProperties: true(#135)
- Add PHPStan extension to support
-
2.2.113 May 2020 -
2.2.008 May 2020 -
2.1.030 Apr 2020Nothing published for this version
-
2.0.028 Apr 2020Release notes
Open source →- Bump minimum required PHP version to 7.4
- Support for nested immutable DTOs (#86)
-
1.14.115 Dec 2021 -
1.14.031 Aug 2021 -
1.13.329 Jan 2020 -
1.13.208 Jan 2020Release notes
Open source →- DataTransferObjectError::invalidType : get actual type before mutating $value for the error message (#81)
-
1.13.108 Jan 2020 -
1.13.008 Jan 2020 -
1.12.019 Dec 2019Release notes
Open source →- Improved performance by adding a cache (#79)
- Add
FlexibleDataTransferObjectwhich allows for unknown properties to be ignored
-
1.11.028 Nov 2019 -
1.10.016 Oct 2019 -
1.9.104 Oct 2019 -
1.9.030 Aug 2019 -
1.8.018 Mar 2019 -
1.7.111 Feb 2019 -
1.7.004 Feb 2019 -
1.6.604 Dec 2018 -
1.6.520 Nov 2018 -
1.6.415 Nov 2018 -
1.6.314 Nov 2018 -
1.6.214 Nov 2018 -
1.6.114 Nov 2018 -
1.6.014 Nov 2018 -
1.5.107 Nov 2018 -
1.5.007 Nov 2018 -
1.4.005 Nov 2018