Data Transfer Object is an element used to pass data between various places in application. Let’s assume we need data from database to create some report.
Doctr ine from version 2.4 allows to fetch data as DTO in a very pleasent way.
Instead of fetching whole entities and extracting data from them, we can immedietly retrieve objects filled with data. Thanks to this we can save a lot of processor cycles, as well as avoid writing many more lines of code