Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Update routing.rst #717

Closed

Conversation

mediamonks-robert
Copy link
Contributor

Action is automatically added. When specifing the action as "indexAction" in the config it will actually convert to "indexActionAction' function which does not exist resulting in a "Controller "::indexAction" for URI "/" is not callable." exception.

Action is automatically added. When specifing the action as "indexAction" in the config it will actually convert to "indexActionAction' function which does not exist resulting in a "Controller "<bundle>:<controller>:indexAction" for URI "/<path>" is not callable." exception.
@mediamonks-robert
Copy link
Contributor Author

Can also be applied to 1.0/1.1/1.2 branches if possible or do you want me to create new PRs for that?

@dbu
Copy link
Member

dbu commented Nov 5, 2015

Action is only appended when you use the class notation App:Default:index for AppBundle\Controller\DefaultController::indexAction, not when you use the service notation controller.default:indexAction. the examples you try to change are with services, so they are correct. if this is the first example of routing configuration in the book, we could add a note to tell the readers we use services for route definitions, and if you use the other notation, things look different. and link to the symfony doc about routing configuration.

@mediamonks-robert
Copy link
Contributor Author

Makes sense, thanks for explaining! I'd go with your suggestion to explain this example assumes your controllers are defined as services then.

@dbu
Copy link
Member

dbu commented Nov 5, 2015 via email

@mediamonks-robert
Copy link
Contributor Author

I'll try to create a new PR within a few days but I'm not sure if I can explain it well enough yet.

@dbu
Copy link
Member

dbu commented Nov 5, 2015

just try it, we can help if its not clear enough, no worries. the idea would be a very short note saying we do the controllers as services and link to this cookbook article: http://symfony.com/doc/current/cookbook/controller/service.html

@dbu dbu closed this Nov 5, 2015
@lsmith77 lsmith77 removed the wip/poc label Nov 5, 2015
@dbu dbu mentioned this pull request Nov 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants