api-platform / core

The server component of API Platform: hypermedia and GraphQL APIs in minutes
https://api-platform.com
MIT License
2.4k stars 857 forks source link

Output when use Processor #6499

Open expondo opened 1 month ago

expondo commented 1 month ago

API Platform version(s) affected: 3.3.11

Description

I have ApiResource endpoint defined on DTO with Post(). In t hi endpoint i use Procesor, and method process return void. Before update to 3.3.11 in this case (version 3.2.12) this endpoint returned the same input, but after update to 3.3.11 the same endpoint are returning "null". I already fixed that, bit this is little strange change in that update.

How to reproduce

processor like @implements ProcessorInterface<MyDTO, void> will return MyDTO in version 3.2.12 will retur n"null" in 3.3.11

Possible Solution

Additional Context

soyuka commented 1 month ago

It's an expected behavior returning void is the same as null we don't want to guess what output you want, maybe that we can add something to the changelog in that regard.