Open Cartman34 opened 8 months ago
It's working using ?reporters=my_reporter but it's not matching documentation.
Hey @Cartman34!
I'm not quite seeing the issue but what version of Symfony are you on? I know newer versions have locked down the behaviour of query->get()
and query->all()
.
Hey @kbond I am using Symfony v4.4 and I am not allowed to upgrade it for now.
Right, we dropped 4.4 support in the latest version.
On version v2.21.0, I am experiencing an issue providing an additional reporter.
According to documentation, I declared my own report service and I try to use it by requesting /health?reporters[]=my_reporter The controller is ok, the service is ok, so I debugged the app and find the issue:
In controller, the action runTests is doing $reporters = $request->query->all('reporters') ?? []; instead of $reporters = $request->query->get('reporters') ?? [];
So all() returns the whole parameters as array and it's not recognizing the reporter alias.
My own need is to rewrite response array to use camelCase only because snake_case is prohibited on my API.