Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Controller is ignoring additional controllers #290

Open
Cartman34 opened this issue Dec 11, 2023 · 4 comments
Open

[Bug] Controller is ignoring additional controllers #290

Cartman34 opened this issue Dec 11, 2023 · 4 comments

Comments

@Cartman34
Copy link

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.

@Cartman34
Copy link
Author

It's working using ?reporters=my_reporter but it's not matching documentation.

@kbond
Copy link
Collaborator

kbond commented Dec 13, 2023

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().

@Cartman34
Copy link
Author

Hey @kbond I am using Symfony v4.4 and I am not allowed to upgrade it for now.

@kbond
Copy link
Collaborator

kbond commented Jan 3, 2024

Right, we dropped 4.4 support in the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants