{"action":"created","comment":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments/97539825","pull_request_review_id":18151457,"id":97539825,"diff_hunk":"@@ -10,6 +10,13 @@\n     </parameters>\n     <services>\n         <service id=\"sonata.admin.security.handler.noop\" class=\"%sonata.admin.security.handler.noop.class%\" public=\"false\"/>\n+        <service id=\"sonata.admin.security.handler.cache\"\n+            class=\"Sonata\\AdminBundle\\Security\\Handler\\CacheSecurityHandler\"\n+            decorates=\"sonata.admin.security.handler\"","path":"Resources/config/security.xml","position":null,"original_position":6,"commit_id":"faf12e548e7d3e134e68d7b70cf43c7526d616ce","original_commit_id":"55907981f45c8edb2a9c9b4f2a2e0c3fa713f195","user":{"login":"fbourigault","id":1116116,"avatar_url":"https://avatars.githubusercontent.com/u/1116116?v=3","gravatar_id":"","url":"https://api.github.com/users/fbourigault","html_url":"https://github.com/fbourigault","followers_url":"https://api.github.com/users/fbourigault/followers","following_url":"https://api.github.com/users/fbourigault/following{/other_user}","gists_url":"https://api.github.com/users/fbourigault/gists{/gist_id}","starred_url":"https://api.github.com/users/fbourigault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbourigault/subscriptions","organizations_url":"https://api.github.com/users/fbourigault/orgs","repos_url":"https://api.github.com/users/fbourigault/repos","events_url":"https://api.github.com/users/fbourigault/events{/privacy}","received_events_url":"https://api.github.com/users/fbourigault/received_events","type":"User","site_admin":false},"body":"Sadly I can't use this feature introduced in Symfony 2.5. Can I directly set the `sonata.admin.security.handler` to be the cache one and use the `security.handler` configuration value as first argument?","created_at":"2017-01-24T12:57:42Z","updated_at":"2017-01-24T12:57:42Z","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4287#discussion_r97539825","pull_request_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4287","_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments/97539825"},"html":{"href":"https://github.com/sonata-project/SonataAdminBundle/pull/4287#discussion_r97539825"},"pull_request":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4287"}}},"pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4287","id":102819746,"html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4287","diff_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4287.diff","patch_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4287.patch","issue_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4287","number":4287,"state":"open","locked":false,"title":"[WIP] Deprecate AbstractAdmin::isGranted","user":{"login":"fbourigault","id":1116116,"avatar_url":"https://avatars.githubusercontent.com/u/1116116?v=3","gravatar_id":"","url":"https://api.github.com/users/fbourigault","html_url":"https://github.com/fbourigault","followers_url":"https://api.github.com/users/fbourigault/followers","following_url":"https://api.github.com/users/fbourigault/following{/other_user}","gists_url":"https://api.github.com/users/fbourigault/gists{/gist_id}","starred_url":"https://api.github.com/users/fbourigault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbourigault/subscriptions","organizations_url":"https://api.github.com/users/fbourigault/orgs","repos_url":"https://api.github.com/users/fbourigault/repos","events_url":"https://api.github.com/users/fbourigault/events{/privacy}","received_events_url":"https://api.github.com/users/fbourigault/received_events","type":"User","site_admin":false},"body":"I am targetting this branch, because I'm adding deprecation notices.\r\n\r\nCloses #4095.\r\n\r\n## To do\r\n\r\n- [ ] Write changelog.\r\n- [ ] Write `CacheSecurityHandler` tests.\r\n- [ ] Update the documentation.\r\n- [ ] Add an upgrade note.\r\n\r\n## Subject\r\nThis PR remove a responsibility from the `AbstractAdmin` class. The `AbstractAdmin::isGranted` method is now deprecated. `SecurityHandlerInterface::isGranted` has now to be called directly.\r\n\r\nThe caching feature has been moved to a new `CacheSecurityHandler` which decorates the `sonata.admin.security.handler` service.\r\n\r\nA twig function is added to replace `admin.is_granted` calls.\r\n\r\nThere is no longer cache if admin security_handler is customized. Should I decorate the SecurityHandler once per admin class?\r\n\r\n`SecurityHandlerInterface::isGranted` third argument was either the object or the admin when called through `AbstractAdmin::isGranted`. Does using null as `SecurityHandlerInterface::isGranted` third argument has also to be deprecated?\r\n","created_at":"2017-01-23T23:02:39Z","updated_at":"2017-01-24T12:57:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"428e30b113c6c0040b98dd21a8e39485c7412ffe","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4287/commits","review_comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4287/comments","review_comment_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4287/comments","statuses_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/statuses/faf12e548e7d3e134e68d7b70cf43c7526d616ce","head":{"label":"fbourigault:deprecate-is-granted","ref":"deprecate-is-granted","sha":"faf12e548e7d3e134e68d7b70cf43c7526d616ce","user":{"login":"fbourigault","id":1116116,"avatar_url":"https://avatars.githubusercontent.com/u/1116116?v=3","gravatar_id":"","url":"https://api.github.com/users/fbourigault","html_url":"https://github.com/fbourigault","followers_url":"https://api.github.com/users/fbourigault/followers","following_url":"https://api.github.com/users/fbourigault/following{/other_user}","gists_url":"https://api.github.com/users/fbourigault/gists{/gist_id}","starred_url":"https://api.github.com/users/fbourigault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbourigault/subscriptions","organizations_url":"https://api.github.com/users/fbourigault/orgs","repos_url":"https://api.github.com/users/fbourigault/repos","events_url":"https://api.github.com/users/fbourigault/events{/privacy}","received_events_url":"https://api.github.com/users/fbourigault/received_events","type":"User","site_admin":false},"repo":{"id":65545053,"name":"SonataAdminBundle","full_name":"fbourigault/SonataAdminBundle","owner":{"login":"fbourigault","id":1116116,"avatar_url":"https://avatars.githubusercontent.com/u/1116116?v=3","gravatar_id":"","url":"https://api.github.com/users/fbourigault","html_url":"https://github.com/fbourigault","followers_url":"https://api.github.com/users/fbourigault/followers","following_url":"https://api.github.com/users/fbourigault/following{/other_user}","gists_url":"https://api.github.com/users/fbourigault/gists{/gist_id}","starred_url":"https://api.github.com/users/fbourigault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbourigault/subscriptions","organizations_url":"https://api.github.com/users/fbourigault/orgs","repos_url":"https://api.github.com/users/fbourigault/repos","events_url":"https://api.github.com/users/fbourigault/events{/privacy}","received_events_url":"https://api.github.com/users/fbourigault/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fbourigault/SonataAdminBundle","description":"AdminBundle - The missing Symfony2 Admin Generator","fork":true,"url":"https://api.github.com/repos/fbourigault/SonataAdminBundle","forks_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/forks","keys_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/teams","hooks_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/events","assignees_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/tags","blobs_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/languages","stargazers_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/subscription","commits_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/merges","archive_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/downloads","issues_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/releases{/id}","deployments_url":"https://api.github.com/repos/fbourigault/SonataAdminBundle/deployments","created_at":"2016-08-12T10:25:48Z","updated_at":"2016-08-12T10:25:51Z","pushed_at":"2017-01-24T08:28:27Z","git_url":"git://github.com/fbourigault/SonataAdminBundle.git","ssh_url":"git@github.com:fbourigault/SonataAdminBundle.git","clone_url":"https://github.com/fbourigault/SonataAdminBundle.git","svn_url":"https://github.com/fbourigault/SonataAdminBundle","homepage":"http://sonata-project.org/bundles/admin","size":18621,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"3.x"}},"base":{"label":"sonata-project:3.x","ref":"3.x","sha":"52360a0ab3e1babe96b4607dbe58be89c706806e","user":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"repo":{"id":1095228,"name":"SonataAdminBundle","full_name":"sonata-project/SonataAdminBundle","owner":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonata-project/SonataAdminBundle","description":"AdminBundle - The missing Symfony2 Admin Generator","fork":false,"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle","forks_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/forks","keys_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/teams","hooks_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/events","assignees_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/tags","blobs_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/languages","stargazers_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/subscription","commits_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/merges","archive_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/downloads","issues_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/releases{/id}","deployments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/deployments","created_at":"2010-11-19T17:08:52Z","updated_at":"2017-01-19T09:50:39Z","pushed_at":"2017-01-24T12:11:08Z","git_url":"git://github.com/sonata-project/SonataAdminBundle.git","ssh_url":"git@github.com:sonata-project/SonataAdminBundle.git","clone_url":"https://github.com/sonata-project/SonataAdminBundle.git","svn_url":"https://github.com/sonata-project/SonataAdminBundle","homepage":"http://sonata-project.org/bundles/admin","size":18695,"stargazers_count":1449,"watchers_count":1449,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1037,"mirror_url":null,"open_issues_count":300,"forks":1037,"open_issues":300,"watchers":1449,"default_branch":"3.x"}},"_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4287"},"html":{"href":"https://github.com/sonata-project/SonataAdminBundle/pull/4287"},"issue":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4287"},"comments":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4287/comments"},"review_comments":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4287/comments"},"review_comment":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4287/commits"},"statuses":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/statuses/faf12e548e7d3e134e68d7b70cf43c7526d616ce"}}}}
{"actor":{"display_login":"fbourigault"}}