{"action":"closed","number":10334,"pull_request":{"url":"https://api.github.com/repos/Wikia/app/pulls/10334","id":68113502,"html_url":"https://github.com/Wikia/app/pull/10334","diff_url":"https://github.com/Wikia/app/pull/10334.diff","patch_url":"https://github.com/Wikia/app/pull/10334.patch","issue_url":"https://api.github.com/repos/Wikia/app/issues/10334","number":10334,"state":"closed","locked":false,"title":"SEO-311 Paginator refactor: Second batch of changes","user":{"login":"gabrys","id":74567,"avatar_url":"https://avatars.githubusercontent.com/u/74567?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrys","html_url":"https://github.com/gabrys","followers_url":"https://api.github.com/users/gabrys/followers","following_url":"https://api.github.com/users/gabrys/following{/other_user}","gists_url":"https://api.github.com/users/gabrys/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrys/subscriptions","organizations_url":"https://api.github.com/users/gabrys/orgs","repos_url":"https://api.github.com/users/gabrys/repos","events_url":"https://api.github.com/users/gabrys/events{/privacy}","received_events_url":"https://api.github.com/users/gabrys/received_events","type":"User","site_admin":false},"body":"Most notable is the change for how the Paginator should be called. Instead of\n`Paginator::newFromArray` the preferred method is now `Paginator::newFromCount`.\n\nThe second notable change is  the way `setActivePage` method works. Previously\nit used accept anything (no range validation) and the value was 0-indexed\n(for first page you would pass 0, for second 1, and so on). Now the value is\nchecked for bounds (will default to the first page for numbers < 1 and the\nlast page for pages beyond the last). The expected value is now natural: you\npass 1 for the first page, 2 for second and so on. This way it's consistent\nwith the links `getBarHTML` method generates -- just read the `page` value\nand pass it to `setActivePage`.\n\nThe code no longer checks for `maxItemsPerPage`. If the caller wants 234\nitems per page, `Paginator` will allow it. Previously it would cap the\nitems per page to 48 unless `$maxItemsPerPage` param was also passed to\n`Paginator::newFromArray`.\n\nIn case the number of items per page is supplied by user, it's the\nresponsibility of the controller, or whoever constructs the `Paginator`\nobject to validate that data. Relying on the others to do your job is not\nthe way to go.\n\nLots of refactoring, rewriting, simplification happen too. All covered by\nunit tests.","created_at":"2016-04-27T19:49:15Z","updated_at":"2016-04-29T23:09:18Z","closed_at":"2016-04-29T23:09:18Z","merged_at":"2016-04-29T23:09:18Z","merge_commit_sha":"ebfbadb84398c8b6a46fe38de8ae93e3cf8221b4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/app/pulls/10334/commits","review_comments_url":"https://api.github.com/repos/Wikia/app/pulls/10334/comments","review_comment_url":"https://api.github.com/repos/Wikia/app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/app/issues/10334/comments","statuses_url":"https://api.github.com/repos/Wikia/app/statuses/bf18bcec3682739a8f59d834ee7241b0f082c910","head":{"label":"Wikia:SEO-311-paginator-update","ref":"SEO-311-paginator-update","sha":"bf18bcec3682739a8f59d834ee7241b0f082c910","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":5532313,"name":"app","full_name":"Wikia/app","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/app","description":"Wikia Application Code","fork":false,"url":"https://api.github.com/repos/Wikia/app","forks_url":"https://api.github.com/repos/Wikia/app/forks","keys_url":"https://api.github.com/repos/Wikia/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/app/teams","hooks_url":"https://api.github.com/repos/Wikia/app/hooks","issue_events_url":"https://api.github.com/repos/Wikia/app/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/app/events","assignees_url":"https://api.github.com/repos/Wikia/app/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/app/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/app/tags","blobs_url":"https://api.github.com/repos/Wikia/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/app/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/app/languages","stargazers_url":"https://api.github.com/repos/Wikia/app/stargazers","contributors_url":"https://api.github.com/repos/Wikia/app/contributors","subscribers_url":"https://api.github.com/repos/Wikia/app/subscribers","subscription_url":"https://api.github.com/repos/Wikia/app/subscription","commits_url":"https://api.github.com/repos/Wikia/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/app/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/app/merges","archive_url":"https://api.github.com/repos/Wikia/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/app/downloads","issues_url":"https://api.github.com/repos/Wikia/app/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/app/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/app/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/app/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/app/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/app/deployments","created_at":"2012-08-23T20:55:58Z","updated_at":"2016-04-20T18:06:47Z","pushed_at":"2016-04-29T23:09:18Z","git_url":"git://github.com/Wikia/app.git","ssh_url":"git@github.com:Wikia/app.git","clone_url":"https://github.com/Wikia/app.git","svn_url":"https://github.com/Wikia/app","homepage":"http://dev.wikia.com","size":2303096,"stargazers_count":95,"watchers_count":95,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":90,"forks":78,"open_issues":90,"watchers":95,"default_branch":"dev"}},"base":{"label":"Wikia:dev","ref":"dev","sha":"6fc23d74820c94299c8e992857e63c7d85a914ad","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":5532313,"name":"app","full_name":"Wikia/app","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/app","description":"Wikia Application Code","fork":false,"url":"https://api.github.com/repos/Wikia/app","forks_url":"https://api.github.com/repos/Wikia/app/forks","keys_url":"https://api.github.com/repos/Wikia/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/app/teams","hooks_url":"https://api.github.com/repos/Wikia/app/hooks","issue_events_url":"https://api.github.com/repos/Wikia/app/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/app/events","assignees_url":"https://api.github.com/repos/Wikia/app/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/app/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/app/tags","blobs_url":"https://api.github.com/repos/Wikia/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/app/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/app/languages","stargazers_url":"https://api.github.com/repos/Wikia/app/stargazers","contributors_url":"https://api.github.com/repos/Wikia/app/contributors","subscribers_url":"https://api.github.com/repos/Wikia/app/subscribers","subscription_url":"https://api.github.com/repos/Wikia/app/subscription","commits_url":"https://api.github.com/repos/Wikia/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/app/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/app/merges","archive_url":"https://api.github.com/repos/Wikia/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/app/downloads","issues_url":"https://api.github.com/repos/Wikia/app/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/app/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/app/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/app/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/app/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/app/deployments","created_at":"2012-08-23T20:55:58Z","updated_at":"2016-04-20T18:06:47Z","pushed_at":"2016-04-29T23:09:18Z","git_url":"git://github.com/Wikia/app.git","ssh_url":"git@github.com:Wikia/app.git","clone_url":"https://github.com/Wikia/app.git","svn_url":"https://github.com/Wikia/app","homepage":"http://dev.wikia.com","size":2303096,"stargazers_count":95,"watchers_count":95,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":90,"forks":78,"open_issues":90,"watchers":95,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/app/pulls/10334"},"html":{"href":"https://github.com/Wikia/app/pull/10334"},"issue":{"href":"https://api.github.com/repos/Wikia/app/issues/10334"},"comments":{"href":"https://api.github.com/repos/Wikia/app/issues/10334/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/app/pulls/10334/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/app/pulls/10334/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/app/statuses/bf18bcec3682739a8f59d834ee7241b0f082c910"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"saipetch","id":2159405,"avatar_url":"https://avatars.githubusercontent.com/u/2159405?v=3","gravatar_id":"","url":"https://api.github.com/users/saipetch","html_url":"https://github.com/saipetch","followers_url":"https://api.github.com/users/saipetch/followers","following_url":"https://api.github.com/users/saipetch/following{/other_user}","gists_url":"https://api.github.com/users/saipetch/gists{/gist_id}","starred_url":"https://api.github.com/users/saipetch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saipetch/subscriptions","organizations_url":"https://api.github.com/users/saipetch/orgs","repos_url":"https://api.github.com/users/saipetch/repos","events_url":"https://api.github.com/users/saipetch/events{/privacy}","received_events_url":"https://api.github.com/users/saipetch/received_events","type":"User","site_admin":false},"comments":1,"review_comments":6,"commits":16,"additions":197,"deletions":283,"changed_files":15}}