{"action":"created","comment":{"url":"https://api.github.com/repos/sparkphp/spark/pulls/comments/43123629","id":43123629,"diff_hunk":"@@ -0,0 +1,52 @@\n+<?php\n+\n+namespace Spark\\Configuration;\n+\n+use Auryn\\Injector;\n+\n+class ConfigurationSet implements ConfigurationInterface\n+{\n+    /**\n+     * @var array\n+     */\n+    protected $classes;\n+\n+    /**\n+     * @param array $classes\n+     */\n+    public function __construct(array $classes)\n+    {\n+        $this->validateClasses($classes);\n+\n+        $this->classes = $classes;\n+    }\n+\n+    /**\n+     * @inheritDoc\n+     */\n+    public function apply(Injector $injector)\n+    {\n+        foreach ($this->classes as $class) {\n+            $configuration = $injector->make($class);\n+            $configuration->apply($injector);\n+        }\n+    }\n+\n+    /**\n+     * @param array $classes\n+     * @throws \\DomainException if any classes cannot be loaded\n+     */\n+    protected function validateClasses(array $classes)\n+    {\n+        $invalid = array_filter(\n+            $classes,\n+            function ($class) {\n+                return !is_subclass_of($class, ConfigurationInterface::class);\n+            }\n+        );\n+        if ($invalid) {","path":"src/Configuration/ConfigurationSet.php","position":47,"original_position":47,"commit_id":"b8b8ed944ff67ea6e1ba3c6ee4e2270aa910a08d","original_commit_id":"b8b8ed944ff67ea6e1ba3c6ee4e2270aa910a08d","user":{"login":"shadowhand","id":38203,"avatar_url":"https://avatars.githubusercontent.com/u/38203?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowhand","html_url":"https://github.com/shadowhand","followers_url":"https://api.github.com/users/shadowhand/followers","following_url":"https://api.github.com/users/shadowhand/following{/other_user}","gists_url":"https://api.github.com/users/shadowhand/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowhand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowhand/subscriptions","organizations_url":"https://api.github.com/users/shadowhand/orgs","repos_url":"https://api.github.com/users/shadowhand/repos","events_url":"https://api.github.com/users/shadowhand/events{/privacy}","received_events_url":"https://api.github.com/users/shadowhand/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2015-10-27T13:56:41Z","updated_at":"2015-10-27T13:56:41Z","html_url":"https://github.com/sparkphp/spark/pull/41#discussion_r43123629","pull_request_url":"https://api.github.com/repos/sparkphp/spark/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/comments/43123629"},"html":{"href":"https://github.com/sparkphp/spark/pull/41#discussion_r43123629"},"pull_request":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/sparkphp/spark/pulls/41","id":48800831,"html_url":"https://github.com/sparkphp/spark/pull/41","diff_url":"https://github.com/sparkphp/spark/pull/41.diff","patch_url":"https://github.com/sparkphp/spark/pull/41.patch","issue_url":"https://api.github.com/repos/sparkphp/spark/issues/41","number":41,"state":"open","locked":false,"title":"Add support for injector configurations","user":{"login":"elazar","id":15487,"avatar_url":"https://avatars.githubusercontent.com/u/15487?v=3","gravatar_id":"","url":"https://api.github.com/users/elazar","html_url":"https://github.com/elazar","followers_url":"https://api.github.com/users/elazar/followers","following_url":"https://api.github.com/users/elazar/following{/other_user}","gists_url":"https://api.github.com/users/elazar/gists{/gist_id}","starred_url":"https://api.github.com/users/elazar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elazar/subscriptions","organizations_url":"https://api.github.com/users/elazar/orgs","repos_url":"https://api.github.com/users/elazar/repos","events_url":"https://api.github.com/users/elazar/events{/privacy}","received_events_url":"https://api.github.com/users/elazar/received_events","type":"User","site_admin":false},"body":"**DO NOT MERGE THIS YET**. It will require a corresponding PR in [sparkphp/project](https://github.com/sparkphp/project) to make corresponding changes to the [application bootstrap file](https://github.com/sparkphp/project/blob/master/web/index.php) to avoid breaking things.\r\n\r\n* Add `Configuration` subnamespace with `ConfigurationInterface` for\r\n  implementing individual injector configurations\r\n* Remove `Application::boot()` and move its contents into classes\r\n  under the `Configuration` subnamespace\r\n* Remove `Application->getInjector()`, `getResolver()`, and\r\n  `getRouter()`, as these unnecessarily expose inner workings of the\r\n  class\r\n\r\nFixes #35.","created_at":"2015-10-26T21:36:49Z","updated_at":"2015-10-27T13:56:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e33781c1899d149929a984cb184dc85c2f84537a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sparkphp/spark/pulls/41/commits","review_comments_url":"https://api.github.com/repos/sparkphp/spark/pulls/41/comments","review_comment_url":"https://api.github.com/repos/sparkphp/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sparkphp/spark/issues/41/comments","statuses_url":"https://api.github.com/repos/sparkphp/spark/statuses/b8b8ed944ff67ea6e1ba3c6ee4e2270aa910a08d","head":{"label":"sparkphp:feature/injector-configurations","ref":"feature/injector-configurations","sha":"b8b8ed944ff67ea6e1ba3c6ee4e2270aa910a08d","user":{"login":"sparkphp","id":12573848,"avatar_url":"https://avatars.githubusercontent.com/u/12573848?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkphp","html_url":"https://github.com/sparkphp","followers_url":"https://api.github.com/users/sparkphp/followers","following_url":"https://api.github.com/users/sparkphp/following{/other_user}","gists_url":"https://api.github.com/users/sparkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkphp/subscriptions","organizations_url":"https://api.github.com/users/sparkphp/orgs","repos_url":"https://api.github.com/users/sparkphp/repos","events_url":"https://api.github.com/users/sparkphp/events{/privacy}","received_events_url":"https://api.github.com/users/sparkphp/received_events","type":"Organization","site_admin":false},"repo":{"id":36032948,"name":"spark","full_name":"sparkphp/spark","owner":{"login":"sparkphp","id":12573848,"avatar_url":"https://avatars.githubusercontent.com/u/12573848?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkphp","html_url":"https://github.com/sparkphp","followers_url":"https://api.github.com/users/sparkphp/followers","following_url":"https://api.github.com/users/sparkphp/following{/other_user}","gists_url":"https://api.github.com/users/sparkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkphp/subscriptions","organizations_url":"https://api.github.com/users/sparkphp/orgs","repos_url":"https://api.github.com/users/sparkphp/repos","events_url":"https://api.github.com/users/sparkphp/events{/privacy}","received_events_url":"https://api.github.com/users/sparkphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sparkphp/spark","description":"A tiny, yet powerful, PHP micro-framework.","fork":false,"url":"https://api.github.com/repos/sparkphp/spark","forks_url":"https://api.github.com/repos/sparkphp/spark/forks","keys_url":"https://api.github.com/repos/sparkphp/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sparkphp/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sparkphp/spark/teams","hooks_url":"https://api.github.com/repos/sparkphp/spark/hooks","issue_events_url":"https://api.github.com/repos/sparkphp/spark/issues/events{/number}","events_url":"https://api.github.com/repos/sparkphp/spark/events","assignees_url":"https://api.github.com/repos/sparkphp/spark/assignees{/user}","branches_url":"https://api.github.com/repos/sparkphp/spark/branches{/branch}","tags_url":"https://api.github.com/repos/sparkphp/spark/tags","blobs_url":"https://api.github.com/repos/sparkphp/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sparkphp/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sparkphp/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/sparkphp/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sparkphp/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/sparkphp/spark/languages","stargazers_url":"https://api.github.com/repos/sparkphp/spark/stargazers","contributors_url":"https://api.github.com/repos/sparkphp/spark/contributors","subscribers_url":"https://api.github.com/repos/sparkphp/spark/subscribers","subscription_url":"https://api.github.com/repos/sparkphp/spark/subscription","commits_url":"https://api.github.com/repos/sparkphp/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/sparkphp/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/sparkphp/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/sparkphp/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/sparkphp/spark/contents/{+path}","compare_url":"https://api.github.com/repos/sparkphp/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sparkphp/spark/merges","archive_url":"https://api.github.com/repos/sparkphp/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sparkphp/spark/downloads","issues_url":"https://api.github.com/repos/sparkphp/spark/issues{/number}","pulls_url":"https://api.github.com/repos/sparkphp/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/sparkphp/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/sparkphp/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sparkphp/spark/labels{/name}","releases_url":"https://api.github.com/repos/sparkphp/spark/releases{/id}","created_at":"2015-05-21T19:24:54Z","updated_at":"2015-10-26T19:03:41Z","pushed_at":"2015-10-27T13:54:51Z","git_url":"git://github.com/sparkphp/spark.git","ssh_url":"git@github.com:sparkphp/spark.git","clone_url":"https://github.com/sparkphp/spark.git","svn_url":"https://github.com/sparkphp/spark","homepage":"http://sparkphp.github.io","size":566,"stargazers_count":68,"watchers_count":68,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":68,"default_branch":"master"}},"base":{"label":"sparkphp:master","ref":"master","sha":"774e48232fd85eb361f6e1b83811233f03f0cd81","user":{"login":"sparkphp","id":12573848,"avatar_url":"https://avatars.githubusercontent.com/u/12573848?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkphp","html_url":"https://github.com/sparkphp","followers_url":"https://api.github.com/users/sparkphp/followers","following_url":"https://api.github.com/users/sparkphp/following{/other_user}","gists_url":"https://api.github.com/users/sparkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkphp/subscriptions","organizations_url":"https://api.github.com/users/sparkphp/orgs","repos_url":"https://api.github.com/users/sparkphp/repos","events_url":"https://api.github.com/users/sparkphp/events{/privacy}","received_events_url":"https://api.github.com/users/sparkphp/received_events","type":"Organization","site_admin":false},"repo":{"id":36032948,"name":"spark","full_name":"sparkphp/spark","owner":{"login":"sparkphp","id":12573848,"avatar_url":"https://avatars.githubusercontent.com/u/12573848?v=3","gravatar_id":"","url":"https://api.github.com/users/sparkphp","html_url":"https://github.com/sparkphp","followers_url":"https://api.github.com/users/sparkphp/followers","following_url":"https://api.github.com/users/sparkphp/following{/other_user}","gists_url":"https://api.github.com/users/sparkphp/gists{/gist_id}","starred_url":"https://api.github.com/users/sparkphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sparkphp/subscriptions","organizations_url":"https://api.github.com/users/sparkphp/orgs","repos_url":"https://api.github.com/users/sparkphp/repos","events_url":"https://api.github.com/users/sparkphp/events{/privacy}","received_events_url":"https://api.github.com/users/sparkphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sparkphp/spark","description":"A tiny, yet powerful, PHP micro-framework.","fork":false,"url":"https://api.github.com/repos/sparkphp/spark","forks_url":"https://api.github.com/repos/sparkphp/spark/forks","keys_url":"https://api.github.com/repos/sparkphp/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sparkphp/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sparkphp/spark/teams","hooks_url":"https://api.github.com/repos/sparkphp/spark/hooks","issue_events_url":"https://api.github.com/repos/sparkphp/spark/issues/events{/number}","events_url":"https://api.github.com/repos/sparkphp/spark/events","assignees_url":"https://api.github.com/repos/sparkphp/spark/assignees{/user}","branches_url":"https://api.github.com/repos/sparkphp/spark/branches{/branch}","tags_url":"https://api.github.com/repos/sparkphp/spark/tags","blobs_url":"https://api.github.com/repos/sparkphp/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sparkphp/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sparkphp/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/sparkphp/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sparkphp/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/sparkphp/spark/languages","stargazers_url":"https://api.github.com/repos/sparkphp/spark/stargazers","contributors_url":"https://api.github.com/repos/sparkphp/spark/contributors","subscribers_url":"https://api.github.com/repos/sparkphp/spark/subscribers","subscription_url":"https://api.github.com/repos/sparkphp/spark/subscription","commits_url":"https://api.github.com/repos/sparkphp/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/sparkphp/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/sparkphp/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/sparkphp/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/sparkphp/spark/contents/{+path}","compare_url":"https://api.github.com/repos/sparkphp/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sparkphp/spark/merges","archive_url":"https://api.github.com/repos/sparkphp/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sparkphp/spark/downloads","issues_url":"https://api.github.com/repos/sparkphp/spark/issues{/number}","pulls_url":"https://api.github.com/repos/sparkphp/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/sparkphp/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/sparkphp/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sparkphp/spark/labels{/name}","releases_url":"https://api.github.com/repos/sparkphp/spark/releases{/id}","created_at":"2015-05-21T19:24:54Z","updated_at":"2015-10-26T19:03:41Z","pushed_at":"2015-10-27T13:54:51Z","git_url":"git://github.com/sparkphp/spark.git","ssh_url":"git@github.com:sparkphp/spark.git","clone_url":"https://github.com/sparkphp/spark.git","svn_url":"https://github.com/sparkphp/spark","homepage":"http://sparkphp.github.io","size":566,"stargazers_count":68,"watchers_count":68,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/41"},"html":{"href":"https://github.com/sparkphp/spark/pull/41"},"issue":{"href":"https://api.github.com/repos/sparkphp/spark/issues/41"},"comments":{"href":"https://api.github.com/repos/sparkphp/spark/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sparkphp/spark/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/sparkphp/spark/statuses/b8b8ed944ff67ea6e1ba3c6ee4e2270aa910a08d"}}}}