api-platform / core

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

fix(state) handle empty request in read provider #6403

Closed guillaume-sainthillier closed 3 weeks ago

guillaume-sainthillier commented 4 weeks ago
Q A
Branch? 3.2
Tickets #6404
License MIT
Doc PR N/A

Hello, this PR let ReadProvider handle nullable request because RequestParser::getQueryString($request) expects a request object to work.

We had this bug when using provider in CLI during async export of a GetCollection operation

soyuka commented 4 weeks ago

nice catch, wasn't expecting code to be used like this but I see no reason it wouldn't work :)

let me know if you have more issues, commit message is also missing : after the fix(state)

guillaume-sainthillier commented 4 weeks ago

nice catch, wasn't expecting code to be used like this but I see no reason it wouldn't work :)

let me know if you have more issues, commit message is also missing : after the fix(state)

Thank you for quick review! Indeed we do serialize query filters before turning on async mode, so no request is present :-)