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

Merged
merged 1 commit into from Apr 12, 2014

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.

@mnapoli mnapoli 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.
c7f7791
@mnapoli mnapoli referenced this pull request in PHP-DI/Symfony-Bridge Apr 12, 2014
Closed

FOSRestBundle incompatibility #1

@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