PackageTrack
Sign in Get early access

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 2022
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 68
  1. 3.9.1 16 Sep 2022
    Release notes

    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

    Open source →
    Release notes

    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

    Open source →
  2. 3.9.0 14 Sep 2022
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.8.1...3.9.0

    Open source →
    Release notes

    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

    Open source →
  3. 3.8.1 02 Jun 2022
    Release notes

    What's Changed

    Full Changelog: 3.8.0...3.8.1

    Open source →
    Release notes

    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

    Open source →
  4. 3.8.0 02 Jun 2022
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.7.3...3.8.0

    Open source →
    Release notes

    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

    Open source →
  5. 3.7.3 30 Dec 2021
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.7.2...3.7.3

    Open source →
  6. 3.7.2 17 Sep 2021
    Release notes
    • #[Strict] is passed down the inheritance chain so children are strict when parent is strict (#239)
    Open source →
    Release notes
    • #[Strict] is passed down the inheritance chain so children are strict when parent is strict (#239)
    Open source →
  7. 3.7.1 09 Sep 2021
    Release notes
    • Cast properties with self or parent type (#236)
    Open source →
    Release notes
    • Cast properties with self or parent type (#236)
    Open source →
  8. 3.7.0 26 Aug 2021
    Release notes
    • Add #[MapTo] support (#233)
    Open source →
  9. 3.6.2 25 Aug 2021
    Release notes
    • Correct behavior of Arr::forget with dot keys (#231)
    Open source →
  10. 3.6.1 17 Aug 2021
    Release notes
    • Fix array assignment bug with strict dto's (#225)
    Open source →
  11. 3.6.0 12 Aug 2021
    Release notes
    • Support mapped properties (#224)
    Open source →
  12. 3.5.0 11 Aug 2021
    Release notes
    • Support union types in casters (#210)
    Open source →
  13. 3.4.0 10 Aug 2021
    Release notes
    • Fix for an empty value being created when casting ArrayAccess objects (#216)
    • Add logic exception when attempting to cast ArrayAccess objects that are not traversable (#216)
    • Allow the ArrayCaster to retain values that are already instances of the itemType (#217)
    Open source →
  14. 3.3.0 01 Jun 2021
    Release notes
    • Expose DTO and validation error array in ValidationException (#213)
    Open source →
  15. 3.2.0 31 May 2021
    Release notes
    • Support generic casters (#199)
    • Add ArrayCaster
    • Add casting of objects that implement ArrayAccess to the ArrayCaster (#206)
    • Fix for caster subclass check (#204)
    Open source →
  16. 3.1.1 26 Apr 2021
    Release notes
    • Make DefaultCast repeatable (#202)
    Open source →
  17. 3.1.0 21 Apr 2021
    Release notes
    • Add DataTransferObject::clone(...$args)
    Open source →
  18. 3.0.4 14 Apr 2021
    Release notes
    • Support union types (#185)
    • Resolve default cast from parent classes (#189)
    • Support default values (#191)
    Open source →
  19. 3.0.3 08 Apr 2021
    Release notes
    • Fix when nested DTO have casted field (#178)
    Open source →
  20. 3.0.2 02 Apr 2021
    Release notes
    • Allow valid DTOs to be passed to caster (#177)
    Open source →
  21. 3.0.1 02 Apr 2021
    Release notes
    • Fix for null values with casters
    Open source →
  22. 3.0.0 02 Apr 2021
    Release notes

    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]
    Open source →
  23. 2.8.4 07 Dec 2021
    Release notes

    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

    Full Changelog: 2.8.3...2.8.4

    Open source →
  24. 2.8.3 12 Feb 2021
    Release notes
    • Add support for using collection internally
    Open source →
  25. 2.8.2 11 Feb 2021
    Release notes

    This might be a breaking change, but it was required for a bugfix

    • Prevent DataTransferObjectCollection from iterating over array copy (#166)
    Open source →
  26. 2.8.1 10 Feb 2021
    Release notes
    • Fix for incorrect return type (#164)
    Open source →
  27. 2.8.0 27 Jan 2021
    Release notes
    • Allow the traversal of collections with string keys
    Open source →
  28. 2.7.0 21 Jan 2021
    Release notes
    • Cast nested collections (#117)
    Open source →
  29. 2.6.0 26 Nov 2020
    Release notes
    • Support PHP 8
    Open source →
  30. 2.5.0 28 Aug 2020
    Release notes
    • Group type errors (#130)
    Open source →
  31. 2.4.0 28 Aug 2020
    Release notes
    • Support for array<int, string> syntax (#136)
    Open source →
  32. 2.3.0 19 Aug 2020
    Release notes
    • Add PHPStan extension to support checkUninitializedProperties: true (#135)
    Open source →
  33. 2.2.1 13 May 2020
    Release notes
    • Validator for typed 7.4 properties (#109)
    Open source →
  34. 2.2.0 08 May 2020
    Release notes
    • Add support for typed properties to DTO casting in PHP 7.4
    Open source →
  35. 2.1.0 30 Apr 2020

    Nothing published for this version

  36. 2.0.0 28 Apr 2020
    Release notes
    • Bump minimum required PHP version to 7.4
    • Support for nested immutable DTOs (#86)
    Open source →
  37. 1.14.1 15 Dec 2021
    Release notes
    • Support PHP 8.1

    Full Changelog: 1.14.0...1.14.1

    Open source →
  38. 1.14.0 31 Aug 2021
    Release notes
    • Support PHP ^8.0
    Open source →
  39. 1.13.3 29 Jan 2020
    Release notes
    • Ignore static properties when serializing (#88)
    Open source →
  40. 1.13.2 08 Jan 2020
    Release notes
    • DataTransferObjectError::invalidType : get actual type before mutating $value for the error message (#81)
    Open source →
  41. 1.13.1 08 Jan 2020
    Release notes
    • Improve extendability of DTOs (#80)
    Open source →
  42. 1.13.0 08 Jan 2020
    Release notes
    • Ignore static properties (#82)
    • Add DataTransferObject::arrayOf (#83)
    Open source →
  43. 1.12.0 19 Dec 2019
    Release notes
    • Improved performance by adding a cache (#79)
    • Add FlexibleDataTransferObject which allows for unknown properties to be ignored
    Open source →
  44. 1.11.0 28 Nov 2019
    Release notes
    • Add iterable and iterable<\Type> support
    Open source →
  45. 1.10.0 16 Oct 2019
    Release notes
    • Allow a DTO to be constructed without an array (#68)
    Open source →
  46. 1.9.1 04 Oct 2019
    Release notes
    • Improve type error message
    Open source →
  47. 1.9.0 30 Aug 2019
    Release notes
    • Add DataTransferObjectCollection::items()
    Open source →
  48. 1.8.0 18 Mar 2019
    Release notes
    • Support immutability
    Open source →
  49. 1.7.1 11 Feb 2019
    Release notes
    • Fixes #47, allowing empty dto's to be cast to using an empty array.
    Open source →
  50. 1.7.0 04 Feb 2019
    Release notes
    • Nested array DTO casting supported.
    Open source →
  51. 1.6.6 04 Dec 2018
    Release notes
    • Properly support float.
    Open source →
  52. 1.6.5 20 Nov 2018
    Release notes
    • Fix uninitialised error with default value.
    Open source →
  53. 1.6.4 15 Nov 2018
    Release notes
    • Don't use allValues anymore.
    Open source →
  54. 1.6.3 14 Nov 2018
    Release notes
    • Support nested collections in collections
    • Cleanup code
    Open source →
  55. 1.6.2 14 Nov 2018
    Release notes
    • Remove too much magic in nested array casting
    Open source →
  56. 1.6.1 14 Nov 2018
    Release notes
    • Support nested toArray in collections.
    Open source →
  57. 1.6.0 14 Nov 2018
    Release notes
    • Support nested toArray.
    Open source →
  58. 1.5.1 07 Nov 2018
    Release notes
    • Add strict type declarations
    Open source →
  59. 1.5.0 07 Nov 2018
    Release notes
    • Add auto casting of nested DTOs
    Open source →
  60. 1.4.0 05 Nov 2018
    Release notes
    • Rename to data-transfer-object
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive