PHP Classes

PHP Benchmark DTO Transform: Check the performance of several PHP DTO packages

Recommend this page to a friend!
  Info   View files Documentation   View files View files (58)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2023-12-10 (27 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 18 All time: 11,140 This week: 91Up
Version License PHP version Categories
php-dto-transform-be 1.0MIT/X Consortium ...7Data types, Performance and optimization, P...
Description 

Author

This package can check the performance of several PHP DTO packages.

It uses the PHPBench package to measure the performance of PHP DTOs (Data transfer objects) in tasks like creating a data transfer object from an array of property values.

The benchmark results consist mainly of each PHP DTO's time to perform the tested tasks and the memory usage.

The package tests several PHP DTO packages from different developers. Currently, it tries PHP DTO packages:

- Yzen and Yzen Cache

- YII Hydrator

- Spatie

- EventSaucePHP

- Symfony

- CuyZ

- Jane and Jane Cache

Innovation Award
PHP Programming Innovation award nominee
December 2023
Nominee
Vote
Data transfer objects (DTO) are objects that applications use to store values of classes representing fundamental entities that applications manipulate, such as products sold on an e-commerce site.

Eventually, applications will use those objects to retrieve and store their values in data containers such as SQL databases.

Many PHP packages provide classes to implement data transfer objects.

This package implements a benchmark that measures the performance of several PHP DTO packages in essential aspects like speed and memory usage.

This way, other developers can compare the different PHP DTO packages and choose one with better performance.

Manuel Lemos
Picture of Andrey Iatsenko
  Performance   Level  
Name: Andrey Iatsenko <contact>
Classes: 6 packages by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 5x

Documentation

1) https://github.com/yzen-dev/plain-to-class 2) https://github.com/spatie/data-transfer-object 3) https://github.com/EventSaucePHP/ObjectHydrator 4) https://github.com/janephp/automapper 5) https://github.com/CuyZ/Valinor 6) https://github.com/yiisoft/hydrator

LiteCheckBench:

<img width="1098" alt="image" src="https://github.com/yzen-dev/php-dto-transform-benchmark/assets/24630195/1d72122b-355a-4994-996f-e5b9e9a896fd">

FullCheckBench

<img width="1154" alt="image" src="https://github.com/yzen-dev/php-dto-transform-benchmark/assets/24630195/40c187bb-19c2-4726-be1e-6f373ecc88b3">


  Files folder image Files  
File Role Description
Files folder imagetests (1 file, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file phpbench.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  tests  
File Role Description
Files folder imageFull (2 files, 6 directories)
Files folder imageLite (2 files, 5 directories)
  Plain text file SimpleContainer.php Class Class source

  Files folder image Files  /  tests  /  Full  
File Role Description
Files folder imageCuyzVelinorDto (4 files, 1 directory)
Files folder imageDto (4 files, 1 directory)
Files folder imageEventSauceDto (4 files, 1 directory)
Files folder imageJanePhpDto (4 files, 1 directory)
Files folder imageSpatieDto (4 files, 1 directory)
Files folder imageSymphonyDto (4 files, 1 directory)
  Plain text file FullCheckBench.php Class Class source
  Plain text file UserDTO.php Class Class source

  Files folder image Files  /  tests  /  Full  /  CuyzVelinorDto  
File Role Description
Files folder imageAddress (2 files)
  Plain text file ProductDto.php Class Class source
  Plain text file PurchaseDto.php Class Class source
  Plain text file UserDto.php Class Class source
  Accessible without login Plain text file UserTypeEnum.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  Full  /  CuyzVelinorDto  /  Address  
File Role Description
  Plain text file AddressClean.php Class Class source
  Plain text file MetroDto.php Class Class source

  Files folder image Files  /  tests  /  Full  /  Dto  
File Role Description
Files folder imageAddress (2 files)
  Plain text file ProductDto.php Class Class source
  Plain text file PurchaseDto.php Class Class source
  Plain text file UserDto.php Class Class source
  Accessible without login Plain text file UserTypeEnum.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  Full  /  Dto  /  Address  
File Role Description
  Plain text file AddressClean.php Class Class source
  Plain text file MetroDto.php Class Class source

  Files folder image Files  /  tests  /  Full  /  EventSauceDto  
File Role Description
Files folder imageAddress (2 files)
  Plain text file ProductDto.php Class Class source
  Plain text file PurchaseDto.php Class Class source
  Plain text file UserDto.php Class Class source
  Accessible without login Plain text file UserTypeEnum.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  Full  /  EventSauceDto  /  Address  
File Role Description
  Plain text file AddressClean.php Class Class source
  Plain text file MetroDto.php Class Class source

  Files folder image Files  /  tests  /  Full  /  JanePhpDto  
File Role Description
Files folder imageAddress (2 files)
  Plain text file ProductDto.php Class Class source
  Plain text file PurchaseDto.php Class Class source
  Plain text file UserDto.php Class Class source
  Accessible without login Plain text file UserTypeEnum.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  Full  /  JanePhpDto  /  Address  
File Role Description
  Plain text file AddressClean.php Class Class source
  Plain text file MetroDto.php Class Class source

  Files folder image Files  /  tests  /  Full  /  SpatieDto  
File Role Description
Files folder imageAddress (2 files)
  Plain text file ProductDto.php Class Class source
  Plain text file PurchaseDto.php Class Class source
  Plain text file UserDto.php Class Class source
  Accessible without login Plain text file UserTypeEnum.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  Full  /  SpatieDto  /  Address  
File Role Description
  Plain text file AddressClean.php Class Class source
  Plain text file MetroDto.php Class Class source

  Files folder image Files  /  tests  /  Full  /  SymphonyDto  
File Role Description
Files folder imageAddress (2 files)
  Plain text file ProductDto.php Class Class source
  Plain text file PurchaseDto.php Class Class source
  Plain text file UserDto.php Class Class source
  Accessible without login Plain text file UserTypeEnum.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  Full  /  SymphonyDto  /  Address  
File Role Description
  Plain text file AddressClean.php Class Class source
  Plain text file MetroDto.php Class Class source

  Files folder image Files  /  tests  /  Lite  
File Role Description
Files folder imageCuyzDTO (3 files)
Files folder imageEventSauceDTO (2 files)
Files folder imageSpatieDTO (3 files)
Files folder imageYiiSoft (1 file)
Files folder imageYzenDto (3 files)
  Plain text file LiteCheckBench.php Class Class source
  Plain text file UserDTO.php Class Class source

  Files folder image Files  /  tests  /  Lite  /  CuyzDTO  
File Role Description
  Plain text file ProductDTO.php Class Class source
  Plain text file PurchaseDTO.php Class Class source
  Plain text file UserDTO.php Class Class source

  Files folder image Files  /  tests  /  Lite  /  EventSauceDTO  
File Role Description
  Plain text file ProductDTO.php Class Class source
  Plain text file PurchaseDTO.php Class Class source

  Files folder image Files  /  tests  /  Lite  /  SpatieDTO  
File Role Description
  Plain text file ProductDTO.php Class Class source
  Plain text file PurchaseDTO.php Class Class source
  Plain text file UserDTO.php Class Class source

  Files folder image Files  /  tests  /  Lite  /  YiiSoft  
File Role Description
  Plain text file NotFoundException.php Class Class source

  Files folder image Files  /  tests  /  Lite  /  YzenDto  
File Role Description
  Plain text file ProductDTO.php Class Class source
  Plain text file PurchaseDTO.php Class Class source
  Plain text file UserDTO.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:18
This week:0
All time:11,140
This week:91Up