{"action":"created","issue":{"url":"https://api.github.com/repos/PHP-DI/Silex-Bridge/issues/7","labels_url":"https://api.github.com/repos/PHP-DI/Silex-Bridge/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/PHP-DI/Silex-Bridge/issues/7/comments","events_url":"https://api.github.com/repos/PHP-DI/Silex-Bridge/issues/7/events","html_url":"https://github.com/PHP-DI/Silex-Bridge/issues/7","id":111267677,"number":7,"title":"Support ServiceControllerServiceProvider","user":{"login":"jdreesen","id":424602,"avatar_url":"https://avatars.githubusercontent.com/u/424602?v=3","gravatar_id":"","url":"https://api.github.com/users/jdreesen","html_url":"https://github.com/jdreesen","followers_url":"https://api.github.com/users/jdreesen/followers","following_url":"https://api.github.com/users/jdreesen/following{/other_user}","gists_url":"https://api.github.com/users/jdreesen/gists{/gist_id}","starred_url":"https://api.github.com/users/jdreesen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdreesen/subscriptions","organizations_url":"https://api.github.com/users/jdreesen/orgs","repos_url":"https://api.github.com/users/jdreesen/repos","events_url":"https://api.github.com/users/jdreesen/events{/privacy}","received_events_url":"https://api.github.com/users/jdreesen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PHP-DI/Silex-Bridge/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-13T20:48:38Z","updated_at":"2015-10-22T19:18:35Z","closed_at":null,"body":"The Silex bridge cannot be used together with `Silex\\Provider\\ServiceControllerServiceProvider` because it always returns an empty array in `ControllerResolverInterface::getArguments()`.\r\n\r\nThe `ServiceControllerServiceProvider` [decorates the `ControllerResolver`](https://github.com/silexphp/Silex/blob/f59fa3e7ace127dffa3d4c6fd14b0701f96ec0ed/src/Silex/Provider/ServiceControllerServiceProvider.php#L22) of the app, so that the `ControllerResolver::getController()` method of this bridge gets only called if the controller is no Silex service. If it is, [only `ControllerResolver::getArguments()` of this bridge gets called](https://github.com/silexphp/Silex/blob/6ca8bf8815d00e307bc928b22948ff7e6e1ef850/src%2FSilex%2FServiceControllerResolver.php#L58), which always returns an empty array and thus the controller action will be called without arguments, resulting in an error.\r\n\r\nIt seems that we'd need an instance of `Invoker\\ParameterResolver\\ParameterResolver` to resolve the parameters of the controller but I don't know how to get it from the container because it's private."},"comment":{"url":"https://api.github.com/repos/PHP-DI/Silex-Bridge/issues/comments/150327548","html_url":"https://github.com/PHP-DI/Silex-Bridge/issues/7#issuecomment-150327548","issue_url":"https://api.github.com/repos/PHP-DI/Silex-Bridge/issues/7","id":150327548,"user":{"login":"mnapoli","id":720328,"avatar_url":"https://avatars.githubusercontent.com/u/720328?v=3","gravatar_id":"","url":"https://api.github.com/users/mnapoli","html_url":"https://github.com/mnapoli","followers_url":"https://api.github.com/users/mnapoli/followers","following_url":"https://api.github.com/users/mnapoli/following{/other_user}","gists_url":"https://api.github.com/users/mnapoli/gists{/gist_id}","starred_url":"https://api.github.com/users/mnapoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnapoli/subscriptions","organizations_url":"https://api.github.com/users/mnapoli/orgs","repos_url":"https://api.github.com/users/mnapoli/repos","events_url":"https://api.github.com/users/mnapoli/events{/privacy}","received_events_url":"https://api.github.com/users/mnapoli/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T19:18:35Z","updated_at":"2015-10-22T19:18:35Z","body":":+1: I'll rebase https://github.com/PHP-DI/Invoker/pull/2 and try to merge it"}}