{"action":"created","issue":{"url":"https://api.github.com/repos/silexphp/Silex/issues/1388","repository_url":"https://api.github.com/repos/silexphp/Silex","labels_url":"https://api.github.com/repos/silexphp/Silex/issues/1388/labels{/name}","comments_url":"https://api.github.com/repos/silexphp/Silex/issues/1388/comments","events_url":"https://api.github.com/repos/silexphp/Silex/issues/1388/events","html_url":"https://github.com/silexphp/Silex/pull/1388","id":160886663,"number":1388,"title":"Add ControllerServiceProviderInterface for Application::registerAndMount","user":{"login":"naderman","id":154844,"avatar_url":"https://avatars.githubusercontent.com/u/154844?v=3","gravatar_id":"","url":"https://api.github.com/users/naderman","html_url":"https://github.com/naderman","followers_url":"https://api.github.com/users/naderman/followers","following_url":"https://api.github.com/users/naderman/following{/other_user}","gists_url":"https://api.github.com/users/naderman/gists{/gist_id}","starred_url":"https://api.github.com/users/naderman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naderman/subscriptions","organizations_url":"https://api.github.com/users/naderman/orgs","repos_url":"https://api.github.com/users/naderman/repos","events_url":"https://api.github.com/users/naderman/events{/privacy}","received_events_url":"https://api.github.com/users/naderman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-17T13:21:50Z","updated_at":"2016-07-09T20:00:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/silexphp/Silex/pulls/1388","html_url":"https://github.com/silexphp/Silex/pull/1388","diff_url":"https://github.com/silexphp/Silex/pull/1388.diff","patch_url":"https://github.com/silexphp/Silex/pull/1388.patch"},"body":"Simplifies the setup for service providers which also provide controllers, which is possible as mentioned in the documentation at [http://silex.sensiolabs.org/doc/master/providers.html](http://silex.sensiolabs.org/doc/master/providers.html). This PR also formalizes this behaviour with an interface that combines Pimple's `ServiceProviderInterface` and Silex's `ControllerProviderInterface`.\r\n\r\nIf you use quite a few of these in a larger application, your app.php ends up having a lot of\r\n\r\n```php\r\n$app->register($fooProvider = new Bar\\FooProvider());\r\n$app->mount('/foo', $fooProvider);\r\n```\r\n\r\ninstead of which you can use\r\n\r\n```php\r\n$app->registerAndMount('/foo', new Bar\\FooProvider());\r\n```\r\n\r\nNot sure if you think this is superfluous, but I find this a bit more convient, and it's a rather small addition."},"comment":{"url":"https://api.github.com/repos/silexphp/Silex/issues/comments/231552993","html_url":"https://github.com/silexphp/Silex/pull/1388#issuecomment-231552993","issue_url":"https://api.github.com/repos/silexphp/Silex/issues/1388","id":231552993,"user":{"login":"GromNaN","id":400034,"avatar_url":"https://avatars.githubusercontent.com/u/400034?v=3","gravatar_id":"","url":"https://api.github.com/users/GromNaN","html_url":"https://github.com/GromNaN","followers_url":"https://api.github.com/users/GromNaN/followers","following_url":"https://api.github.com/users/GromNaN/following{/other_user}","gists_url":"https://api.github.com/users/GromNaN/gists{/gist_id}","starred_url":"https://api.github.com/users/GromNaN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GromNaN/subscriptions","organizations_url":"https://api.github.com/users/GromNaN/orgs","repos_url":"https://api.github.com/users/GromNaN/repos","events_url":"https://api.github.com/users/GromNaN/events{/privacy}","received_events_url":"https://api.github.com/users/GromNaN/received_events","type":"User","site_admin":false},"created_at":"2016-07-09T20:00:36Z","updated_at":"2016-07-09T20:00:36Z","body":"The solution proposed by @ragboyjr is the one that is implemented by the [WebProfilerServiceProvider](https://github.com/silexphp/Silex-WebProfiler/blob/master/WebProfilerServiceProvider.php#L339)"}}
{"actor":{"display_login":"GromNaN"}}