{"action":"created","comment":{"url":"https://api.github.com/repos/puli/silex-provider/pulls/comments/42646329","id":42646329,"diff_hunk":"@@ -0,0 +1,65 @@\n+<?php\n+\n+/*\n+ * This file is part of the puli/silex-provider package.\n+ *\n+ * (c) Bernhard Schussek <bschussek@gmail.com>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace Puli\\SilexProvider;\n+\n+use Puli\\GeneratedPuliFactory;\n+use Puli\\TwigExtension\\PuliExtension;\n+use Puli\\TwigExtension\\PuliTemplateLoader;\n+use Silex\\Application;\n+use Silex\\ServiceProviderInterface;\n+\n+class PuliServiceProvider implements ServiceProviderInterface\n+{\n+    /**\n+     * Registers services and parameters on the app.\n+     *\n+     * @param Application $app Silex application.\n+     */\n+    public function register(Application $app)\n+    {\n+        $app['puli.repository'] = $app->share(function (Application $app) {\n+            return $app['puli.factory']->createRepository();\n+        });\n+\n+        $app['puli.discovery'] = $app->share(function (Application $app) {\n+            return $app['puli.factory']->createDiscovery($app['puli.repository']);\n+        });\n+\n+        $app['puli.asset_url_generator'] = $app->share(function (Application $app) {\n+            return $app['puli.factory']->createUrlGenerator($app['puli.discovery']);\n+        });\n+\n+        // Templates loader\n+        if (isset($app['twig'])) {","path":"src/PuliServiceProvider.php","position":42,"original_position":42,"commit_id":"699c9a93959122bfba52fd8ae2465d43bbd32e4e","original_commit_id":"699c9a93959122bfba52fd8ae2465d43bbd32e4e","user":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/received_events","type":"User","site_admin":false},"body":"I think there should be some configuration option that controls whether the loader is overwritten.","created_at":"2015-10-21T16:20:04Z","updated_at":"2015-10-21T16:20:04Z","html_url":"https://github.com/puli/silex-provider/pull/1#discussion_r42646329","pull_request_url":"https://api.github.com/repos/puli/silex-provider/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/puli/silex-provider/pulls/comments/42646329"},"html":{"href":"https://github.com/puli/silex-provider/pull/1#discussion_r42646329"},"pull_request":{"href":"https://api.github.com/repos/puli/silex-provider/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/puli/silex-provider/pulls/1","id":48353606,"html_url":"https://github.com/puli/silex-provider/pull/1","diff_url":"https://github.com/puli/silex-provider/pull/1.diff","patch_url":"https://github.com/puli/silex-provider/pull/1.patch","issue_url":"https://api.github.com/repos/puli/silex-provider/issues/1","number":1,"state":"open","locked":false,"title":"implementation","user":{"login":"EmanueleMinotto","id":417201,"avatar_url":"https://avatars.githubusercontent.com/u/417201?v=3","gravatar_id":"","url":"https://api.github.com/users/EmanueleMinotto","html_url":"https://github.com/EmanueleMinotto","followers_url":"https://api.github.com/users/EmanueleMinotto/followers","following_url":"https://api.github.com/users/EmanueleMinotto/following{/other_user}","gists_url":"https://api.github.com/users/EmanueleMinotto/gists{/gist_id}","starred_url":"https://api.github.com/users/EmanueleMinotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmanueleMinotto/subscriptions","organizations_url":"https://api.github.com/users/EmanueleMinotto/orgs","repos_url":"https://api.github.com/users/EmanueleMinotto/repos","events_url":"https://api.github.com/users/EmanueleMinotto/events{/privacy}","received_events_url":"https://api.github.com/users/EmanueleMinotto/received_events","type":"User","site_admin":false},"body":"As discussed on Gitter","created_at":"2015-10-21T16:14:57Z","updated_at":"2015-10-21T16:20:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73214aacd20749317d1a381d53919657fe1c7f8c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puli/silex-provider/pulls/1/commits","review_comments_url":"https://api.github.com/repos/puli/silex-provider/pulls/1/comments","review_comment_url":"https://api.github.com/repos/puli/silex-provider/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puli/silex-provider/issues/1/comments","statuses_url":"https://api.github.com/repos/puli/silex-provider/statuses/699c9a93959122bfba52fd8ae2465d43bbd32e4e","head":{"label":"EmanueleMinotto:implementation","ref":"implementation","sha":"699c9a93959122bfba52fd8ae2465d43bbd32e4e","user":{"login":"EmanueleMinotto","id":417201,"avatar_url":"https://avatars.githubusercontent.com/u/417201?v=3","gravatar_id":"","url":"https://api.github.com/users/EmanueleMinotto","html_url":"https://github.com/EmanueleMinotto","followers_url":"https://api.github.com/users/EmanueleMinotto/followers","following_url":"https://api.github.com/users/EmanueleMinotto/following{/other_user}","gists_url":"https://api.github.com/users/EmanueleMinotto/gists{/gist_id}","starred_url":"https://api.github.com/users/EmanueleMinotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmanueleMinotto/subscriptions","organizations_url":"https://api.github.com/users/EmanueleMinotto/orgs","repos_url":"https://api.github.com/users/EmanueleMinotto/repos","events_url":"https://api.github.com/users/EmanueleMinotto/events{/privacy}","received_events_url":"https://api.github.com/users/EmanueleMinotto/received_events","type":"User","site_admin":false},"repo":{"id":44607830,"name":"silex-provider","full_name":"EmanueleMinotto/silex-provider","owner":{"login":"EmanueleMinotto","id":417201,"avatar_url":"https://avatars.githubusercontent.com/u/417201?v=3","gravatar_id":"","url":"https://api.github.com/users/EmanueleMinotto","html_url":"https://github.com/EmanueleMinotto","followers_url":"https://api.github.com/users/EmanueleMinotto/followers","following_url":"https://api.github.com/users/EmanueleMinotto/following{/other_user}","gists_url":"https://api.github.com/users/EmanueleMinotto/gists{/gist_id}","starred_url":"https://api.github.com/users/EmanueleMinotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmanueleMinotto/subscriptions","organizations_url":"https://api.github.com/users/EmanueleMinotto/orgs","repos_url":"https://api.github.com/users/EmanueleMinotto/repos","events_url":"https://api.github.com/users/EmanueleMinotto/events{/privacy}","received_events_url":"https://api.github.com/users/EmanueleMinotto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EmanueleMinotto/silex-provider","description":"A Silex service provider for Puli.","fork":true,"url":"https://api.github.com/repos/EmanueleMinotto/silex-provider","forks_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/forks","keys_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/teams","hooks_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/hooks","issue_events_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/issues/events{/number}","events_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/events","assignees_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/assignees{/user}","branches_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/branches{/branch}","tags_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/tags","blobs_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/languages","stargazers_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/stargazers","contributors_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/contributors","subscribers_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/subscribers","subscription_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/subscription","commits_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/contents/{+path}","compare_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/merges","archive_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/downloads","issues_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/issues{/number}","pulls_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/labels{/name}","releases_url":"https://api.github.com/repos/EmanueleMinotto/silex-provider/releases{/id}","created_at":"2015-10-20T13:23:41Z","updated_at":"2015-10-20T13:13:47Z","pushed_at":"2015-10-21T16:13:15Z","git_url":"git://github.com/EmanueleMinotto/silex-provider.git","ssh_url":"git@github.com:EmanueleMinotto/silex-provider.git","clone_url":"https://github.com/EmanueleMinotto/silex-provider.git","svn_url":"https://github.com/EmanueleMinotto/silex-provider","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puli:master","ref":"master","sha":"907ab3795ed14103d6ac4a9823c354127a3d7398","user":{"login":"puli","id":9706065,"avatar_url":"https://avatars.githubusercontent.com/u/9706065?v=3","gravatar_id":"","url":"https://api.github.com/users/puli","html_url":"https://github.com/puli","followers_url":"https://api.github.com/users/puli/followers","following_url":"https://api.github.com/users/puli/following{/other_user}","gists_url":"https://api.github.com/users/puli/gists{/gist_id}","starred_url":"https://api.github.com/users/puli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puli/subscriptions","organizations_url":"https://api.github.com/users/puli/orgs","repos_url":"https://api.github.com/users/puli/repos","events_url":"https://api.github.com/users/puli/events{/privacy}","received_events_url":"https://api.github.com/users/puli/received_events","type":"Organization","site_admin":false},"repo":{"id":44605355,"name":"silex-provider","full_name":"puli/silex-provider","owner":{"login":"puli","id":9706065,"avatar_url":"https://avatars.githubusercontent.com/u/9706065?v=3","gravatar_id":"","url":"https://api.github.com/users/puli","html_url":"https://github.com/puli","followers_url":"https://api.github.com/users/puli/followers","following_url":"https://api.github.com/users/puli/following{/other_user}","gists_url":"https://api.github.com/users/puli/gists{/gist_id}","starred_url":"https://api.github.com/users/puli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puli/subscriptions","organizations_url":"https://api.github.com/users/puli/orgs","repos_url":"https://api.github.com/users/puli/repos","events_url":"https://api.github.com/users/puli/events{/privacy}","received_events_url":"https://api.github.com/users/puli/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puli/silex-provider","description":"The Puli service provider for Silex.","fork":false,"url":"https://api.github.com/repos/puli/silex-provider","forks_url":"https://api.github.com/repos/puli/silex-provider/forks","keys_url":"https://api.github.com/repos/puli/silex-provider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puli/silex-provider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puli/silex-provider/teams","hooks_url":"https://api.github.com/repos/puli/silex-provider/hooks","issue_events_url":"https://api.github.com/repos/puli/silex-provider/issues/events{/number}","events_url":"https://api.github.com/repos/puli/silex-provider/events","assignees_url":"https://api.github.com/repos/puli/silex-provider/assignees{/user}","branches_url":"https://api.github.com/repos/puli/silex-provider/branches{/branch}","tags_url":"https://api.github.com/repos/puli/silex-provider/tags","blobs_url":"https://api.github.com/repos/puli/silex-provider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puli/silex-provider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puli/silex-provider/git/refs{/sha}","trees_url":"https://api.github.com/repos/puli/silex-provider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puli/silex-provider/statuses/{sha}","languages_url":"https://api.github.com/repos/puli/silex-provider/languages","stargazers_url":"https://api.github.com/repos/puli/silex-provider/stargazers","contributors_url":"https://api.github.com/repos/puli/silex-provider/contributors","subscribers_url":"https://api.github.com/repos/puli/silex-provider/subscribers","subscription_url":"https://api.github.com/repos/puli/silex-provider/subscription","commits_url":"https://api.github.com/repos/puli/silex-provider/commits{/sha}","git_commits_url":"https://api.github.com/repos/puli/silex-provider/git/commits{/sha}","comments_url":"https://api.github.com/repos/puli/silex-provider/comments{/number}","issue_comment_url":"https://api.github.com/repos/puli/silex-provider/issues/comments{/number}","contents_url":"https://api.github.com/repos/puli/silex-provider/contents/{+path}","compare_url":"https://api.github.com/repos/puli/silex-provider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puli/silex-provider/merges","archive_url":"https://api.github.com/repos/puli/silex-provider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puli/silex-provider/downloads","issues_url":"https://api.github.com/repos/puli/silex-provider/issues{/number}","pulls_url":"https://api.github.com/repos/puli/silex-provider/pulls{/number}","milestones_url":"https://api.github.com/repos/puli/silex-provider/milestones{/number}","notifications_url":"https://api.github.com/repos/puli/silex-provider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puli/silex-provider/labels{/name}","releases_url":"https://api.github.com/repos/puli/silex-provider/releases{/id}","created_at":"2015-10-20T12:41:18Z","updated_at":"2015-10-20T13:37:19Z","pushed_at":"2015-10-21T16:14:57Z","git_url":"git://github.com/puli/silex-provider.git","ssh_url":"git@github.com:puli/silex-provider.git","clone_url":"https://github.com/puli/silex-provider.git","svn_url":"https://github.com/puli/silex-provider","homepage":"http://puli.io","size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puli/silex-provider/pulls/1"},"html":{"href":"https://github.com/puli/silex-provider/pull/1"},"issue":{"href":"https://api.github.com/repos/puli/silex-provider/issues/1"},"comments":{"href":"https://api.github.com/repos/puli/silex-provider/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/puli/silex-provider/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/puli/silex-provider/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puli/silex-provider/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/puli/silex-provider/statuses/699c9a93959122bfba52fd8ae2465d43bbd32e4e"}}}}