Skip to content

Allow controller as services, even when the service ID is the controller class name#743

Merged
lsmith77 merged 1 commit intoFriendsOfSymfony:masterfrom
mnapoli:controller_as_services
Apr 12, 2014
Merged

Allow controller as services, even when the service ID is the controller class name#743
lsmith77 merged 1 commit intoFriendsOfSymfony:masterfrom
mnapoli:controller_as_services

Conversation

@mnapoli
Copy link
Copy Markdown
Contributor

@mnapoli mnapoli commented Apr 12, 2014

The background behind this issue is here: #604 (comment)

The RestRouteLoader now first check if the resource is a service in the container before checking if it's a class name.

That allows to register controller as services in the container and use them in routes, even when we register them by their class name in the container.

The tests turned out to be a bit messy. I tried to keep it clean, but if you want me to remove it I can. I also confirm that the test was failing before the fix, and is now passing after the change in RestRouteLoader.

…he container before checking if it's a class name

That allows to register controller as services in the container and use them in routes, even when we register them by their class name in the container.
lsmith77 added a commit that referenced this pull request Apr 12, 2014
Allow controller as services, even when the service ID is the controller class name
@lsmith77 lsmith77 merged commit c04a931 into FriendsOfSymfony:master Apr 12, 2014
@mnapoli mnapoli deleted the controller_as_services branch April 12, 2014 17:29
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

Successfully merging this pull request may close these issues.

2 participants