Closed Nayte91 closed 1 month ago
Are you sure that this is related to the service and not simply related to the name mismatch (banner vs brochure)?
Hello, Thank you for your time,
I'm pretty sure I managed correctly the name of the variable when I tested (trying with underscore or camelCase, trying few variable names, and adjusting on the controller side), but it's possible that I misstyped something, somewhere.
What I understand from your answer, is that the documentation doesn't worry you, "binding" with the "parameters" key for a controller seems working for you?
I will reproduce with a synthetic example.
I have set up a small application locally and played a bit with it. This indeed does not work and we should merge #20043 to fix it.
Hello,
I was following the documentation here https://symfony.com/doc/current/controller/upload_file.html, everything was ok but I was stuck on this part :
Now, create the brochures_directory parameter that was used in the controller to specify the directory in which the brochures should be stored:
When I was trying (I'm on a 7.1 project), on my own controller, I get an error:
So I changed a bit my services.yaml, removing this "parameters" part, and adding:
And it works!
So I was wondering, has the docs a flaw here? Or do I miss a point from newer SF version, about binding and parameters? That totally can be as I have troubles to understand this config/container part.
I can update the doc, but I need to know why my try didn't work, and what is ultimately the most elegant way to do :)