Closed jenky closed 10 months ago
Attention: 3 lines
in your changes are missing coverage. Please review.
Comparison is base (
992f1e7
) 84.77% compared to head (ec3bde0
) 85.12%. Report is 1 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/Mapper/GenericMapper.php | 83.33% | 2 Missing :warning: |
src/Response.php | 90.90% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Introduced
iterable
as the new return type for decoders to allow for more flexible data structures, moving away from strict arrays. This allows the use of generators for on-demand data processing (cerbero/lazy-json
, Laravel Lazy Collection), resulting in improved performance and reduced memory consumption when parsing large response bodies.$response->decode(): iterable
is nowpublic
instead ofprivate
to return the original value of the decoder.Furthermore, decoders can implement the
MapperInterface
, allowing for the transformation of response bodies into objects. This facilitates object-oriented handling of response data using Data Transfer Objects (DTOs) or Value Objects (VOs). To retrieve your object, uses$response->object()
.