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

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

Merged
merged 1 commit into from Apr 12, 2014

Conversation

Projects
None yet
2 participants
@mnapoli
Contributor

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.

The RestRouteLoader now first check if the resource is a service in t…
…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

Merge pull request #743 from mnapoli/controller_as_services
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

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@mnapoli mnapoli deleted the mnapoli:controller_as_services branch Apr 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment