{"action":"created","issue":{"url":"https://api.github.com/repos/slimphp/Slim/issues/1445","labels_url":"https://api.github.com/repos/slimphp/Slim/issues/1445/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/1445/comments","events_url":"https://api.github.com/repos/slimphp/Slim/issues/1445/events","html_url":"https://github.com/slimphp/Slim/pull/1445","id":101416463,"number":1445,"title":"Always resolve callables through the CallableResolver","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-17T13:04:36Z","updated_at":"2015-08-17T13:15:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/slimphp/Slim/pulls/1445","html_url":"https://github.com/slimphp/Slim/pull/1445","diff_url":"https://github.com/slimphp/Slim/pull/1445.diff","patch_url":"https://github.com/slimphp/Slim/pull/1445.patch"},"body":"Always resolve callables through the CallableResolver, **even if it's not a `foo:bar` string**.\r\n\r\n---\r\n\r\nIn default Slim's behavior, controller like `foo:bar` go through the `CallableResolver` so that `foo` is resolved using the container.\r\n\r\nHowever I would like to allow other kind of syntaxes to write controller as services, e.g. `['Foo', 'bar']` (this being **not** a static method, so `Foo` is created by the container), `'My\\Invokable\\Controller'`, etc (basically this https://github.com/PHP-DI/Invoker#resolving-callables-from-a-container). To achieve this, I just have to write a custom `CallableResolver`.\r\n\r\nHowever `Route` will call `CallableResolver` only if the controller is a string. I've changed that so that `CallableResolver` is always called, allowing users to customize completely how controllers are located."},"comment":{"url":"https://api.github.com/repos/slimphp/Slim/issues/comments/131814558","html_url":"https://github.com/slimphp/Slim/pull/1445#issuecomment-131814558","issue_url":"https://api.github.com/repos/slimphp/Slim/issues/1445","id":131814558,"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-08-17T13:15:13Z","updated_at":"2015-08-17T13:15:13Z","body":"Makes sense, will update the PR!"}}