-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Too few argument exception on render(controller()) with Twig #2739
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
Comments
Ok the solution is quite simple, use the service id instead: {{ render(controller('fos_user.profile.controller:editAction')) }} Still, it's a BC break to me. Dropping version support is good but it should not change the API. If you think this one is acceptable, feel free to close this issue. Regards. |
hmm, do our controllers ever worked when being rendered inline ? I was not even aware that this would work fine (I don't even think it works by default, but requires some overrides). Anyway, the |
I would accept a note in the upgrade file though if you submit a PR for it. |
It works, only the template are overridden.
I understand. Still, it's a possible way to do.
Not really the time to do it right now and I think #2739 (comment) is an enough information. 😉 |
Symfony FOSUserBundle versions:
Description of the problem including expected versus actual behavior:
When calling a FOSUser controller action from Twig, you have this kind of error:
Steps to reproduce:
Try this on a twig view:
{{ render(controller('FOSUserBundle:Profile:edit')) }}
It was because of #2639 introduced by @weaverryan
How can I call the controller like this if it require a service? I have to do it like that for ajax calls (the profile edit template is overridden).
Plus, AFAIK it's a BC break and should be introduced on next major. Am I wrong?
The text was updated successfully, but these errors were encountered: