{"action":"created","issue":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/1063","repository_url":"https://api.github.com/repos/WP-API/WP-API","labels_url":"https://api.github.com/repos/WP-API/WP-API/issues/1063/labels{/name}","comments_url":"https://api.github.com/repos/WP-API/WP-API/issues/1063/comments","events_url":"https://api.github.com/repos/WP-API/WP-API/issues/1063/events","html_url":"https://github.com/WP-API/WP-API/issues/1063","id":66610747,"number":1063,"title":"Evaluate all protected controller methods","user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/WP-API/WP-API/labels/Discussion","name":"Discussion","color":"eb6420"},{"url":"https://api.github.com/repos/WP-API/WP-API/labels/Enhancement","name":"Enhancement","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/WP-API/WP-API/milestones/10","html_url":"https://github.com/WP-API/WP-API/milestones/2.0","labels_url":"https://api.github.com/repos/WP-API/WP-API/milestones/10/labels","id":844496,"number":10,"title":"2.0","description":"","creator":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":280,"state":"open","created_at":"2014-10-29T00:12:18Z","updated_at":"2016-09-23T01:47:20Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-04-06T13:52:10Z","updated_at":"2016-09-26T15:56:52Z","closed_at":null,"body":"We have a variety of protected controller methods. Once we release WP-API to the wild, we're committing to keeping those methods around forever.\r\n\r\nBefore we do, we should some methods as private so they aren't subclassed, and abstract others out to dedicated functions so they can be used without controllers. `check_is_post_type_allowed()` is one candidate.\r\n\r\nRelated #1062"},"comment":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/comments/249612880","html_url":"https://github.com/WP-API/WP-API/issues/1063#issuecomment-249612880","issue_url":"https://api.github.com/repos/WP-API/WP-API/issues/1063","id":249612880,"user":{"login":"BE-Webdesign","id":16389612,"avatar_url":"https://avatars.githubusercontent.com/u/16389612?v=3","gravatar_id":"","url":"https://api.github.com/users/BE-Webdesign","html_url":"https://github.com/BE-Webdesign","followers_url":"https://api.github.com/users/BE-Webdesign/followers","following_url":"https://api.github.com/users/BE-Webdesign/following{/other_user}","gists_url":"https://api.github.com/users/BE-Webdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/BE-Webdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BE-Webdesign/subscriptions","organizations_url":"https://api.github.com/users/BE-Webdesign/orgs","repos_url":"https://api.github.com/users/BE-Webdesign/repos","events_url":"https://api.github.com/users/BE-Webdesign/events{/privacy}","received_events_url":"https://api.github.com/users/BE-Webdesign/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T15:56:52Z","updated_at":"2016-09-26T15:56:52Z","body":"> Before we do, we should some methods as private so they aren't subclassed\r\n\r\nAt first, I was for leaving these as is.  I am still not too strongly opinionated either way, however after thinking about it more.  If we made some of our protected methods private we could ensure that when we made changes to them we would only be affecting what is in the API and not implementations built on top the API making maintainability and backwards compatability a lot easier.\r\n\r\n> and abstract others out to dedicated functions so they can be used without controllers. check_is_post_type_allowed() is one candidate.\r\n\r\nThis is also another interesting idea as some of the methods potentially shouldn't be methods for the classes and their functionality could be useful outside of the class scope."}}
{"actor":{"display_login":"BE-Webdesign"}}