{"action":"closed","number":24,"pull_request":{"url":"https://api.github.com/repos/zendframework/zend-inputfilter/pulls/24","id":42902485,"html_url":"https://github.com/zendframework/zend-inputfilter/pull/24","diff_url":"https://github.com/zendframework/zend-inputfilter/pull/24.diff","patch_url":"https://github.com/zendframework/zend-inputfilter/pull/24.patch","issue_url":"https://api.github.com/repos/zendframework/zend-inputfilter/issues/24","number":24,"state":"closed","locked":false,"title":"Fix loop validation input context is mutable","user":{"login":"Maks3w","id":1301698,"avatar_url":"https://avatars.githubusercontent.com/u/1301698?v=3","gravatar_id":"","url":"https://api.github.com/users/Maks3w","html_url":"https://github.com/Maks3w","followers_url":"https://api.github.com/users/Maks3w/followers","following_url":"https://api.github.com/users/Maks3w/following{/other_user}","gists_url":"https://api.github.com/users/Maks3w/gists{/gist_id}","starred_url":"https://api.github.com/users/Maks3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maks3w/subscriptions","organizations_url":"https://api.github.com/users/Maks3w/orgs","repos_url":"https://api.github.com/users/Maks3w/repos","events_url":"https://api.github.com/users/Maks3w/events{/privacy}","received_events_url":"https://api.github.com/users/Maks3w/received_events","type":"User","site_admin":false},"body":"Given two input fields the context used in each one will be different. https://github.com/zendframework/zend-inputfilter/pull/24/files#diff-2cd0c1ba642dc3e6de9ca4e2af0f5e71R290\r\n\r\nThis means inputs need to be order sensitive\r\n\r\n```php\r\n$inputs = ['A', 'B'];\r\n$data = [ /* empty */ ];\r\n\r\n$inputA->isValid($context = ['A' => null]);\r\n$inputB->isValid($context = ['A' => null, 'B' => null]);\r\n```\r\n\r\n```php\r\n// Inverse order will change $context too.\r\n$inputs = ['B', 'A'];\r\n$data = [ /* empty */ ];\r\n\r\n$inputB->isValid($context = ['B' => null]);\r\n$inputA->isValid($context = ['B' => null, 'A' => null]);\r\n```\r\n\r\nThis PR provides fix and enhance this feature by building a default input context using the default input values when no custom context is provided.\r\n\r\nFix #16\r\n\r\nSupersede and close #30","created_at":"2015-08-20T08:13:22Z","updated_at":"2015-09-01T18:29:43Z","closed_at":"2015-09-01T18:29:43Z","merged_at":"2015-09-01T18:29:43Z","merge_commit_sha":"e3fc26b07022c8576dc2bd44726b3a9a84c41af5","assignee":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/zendframework/zend-inputfilter/milestones/9","html_url":"https://github.com/zendframework/zend-inputfilter/milestones/2.4.8","labels_url":"https://api.github.com/repos/zendframework/zend-inputfilter/milestones/9/labels","id":1265395,"number":9,"title":"2.4.8","description":"Next 2.4 LTS","creator":{"login":"Maks3w","id":1301698,"avatar_url":"https://avatars.githubusercontent.com/u/1301698?v=3","gravatar_id":"","url":"https://api.github.com/users/Maks3w","html_url":"https://github.com/Maks3w","followers_url":"https://api.github.com/users/Maks3w/followers","following_url":"https://api.github.com/users/Maks3w/following{/other_user}","gists_url":"https://api.github.com/users/Maks3w/gists{/gist_id}","starred_url":"https://api.github.com/users/Maks3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maks3w/subscriptions","organizations_url":"https://api.github.com/users/Maks3w/orgs","repos_url":"https://api.github.com/users/Maks3w/repos","events_url":"https://api.github.com/users/Maks3w/events{/privacy}","received_events_url":"https://api.github.com/users/Maks3w/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":9,"state":"open","created_at":"2015-08-20T22:13:33Z","updated_at":"2015-09-01T18:29:43Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/zendframework/zend-inputfilter/pulls/24/commits","review_comments_url":"https://api.github.com/repos/zendframework/zend-inputfilter/pulls/24/comments","review_comment_url":"https://api.github.com/repos/zendframework/zend-inputfilter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendframework/zend-inputfilter/issues/24/comments","statuses_url":"https://api.github.com/repos/zendframework/zend-inputfilter/statuses/d743878d0d734a9e7b7df98b12a9371901e777ec","head":{"label":"Maks3w:hotfix/mutable-context","ref":"hotfix/mutable-context","sha":"d743878d0d734a9e7b7df98b12a9371901e777ec","user":{"login":"Maks3w","id":1301698,"avatar_url":"https://avatars.githubusercontent.com/u/1301698?v=3","gravatar_id":"","url":"https://api.github.com/users/Maks3w","html_url":"https://github.com/Maks3w","followers_url":"https://api.github.com/users/Maks3w/followers","following_url":"https://api.github.com/users/Maks3w/following{/other_user}","gists_url":"https://api.github.com/users/Maks3w/gists{/gist_id}","starred_url":"https://api.github.com/users/Maks3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maks3w/subscriptions","organizations_url":"https://api.github.com/users/Maks3w/orgs","repos_url":"https://api.github.com/users/Maks3w/repos","events_url":"https://api.github.com/users/Maks3w/events{/privacy}","received_events_url":"https://api.github.com/users/Maks3w/received_events","type":"User","site_admin":false},"repo":{"id":36145848,"name":"zend-inputfilter","full_name":"Maks3w/zend-inputfilter","owner":{"login":"Maks3w","id":1301698,"avatar_url":"https://avatars.githubusercontent.com/u/1301698?v=3","gravatar_id":"","url":"https://api.github.com/users/Maks3w","html_url":"https://github.com/Maks3w","followers_url":"https://api.github.com/users/Maks3w/followers","following_url":"https://api.github.com/users/Maks3w/following{/other_user}","gists_url":"https://api.github.com/users/Maks3w/gists{/gist_id}","starred_url":"https://api.github.com/users/Maks3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maks3w/subscriptions","organizations_url":"https://api.github.com/users/Maks3w/orgs","repos_url":"https://api.github.com/users/Maks3w/repos","events_url":"https://api.github.com/users/Maks3w/events{/privacy}","received_events_url":"https://api.github.com/users/Maks3w/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Maks3w/zend-inputfilter","description":"InputFilter component from Zend Framework","fork":true,"url":"https://api.github.com/repos/Maks3w/zend-inputfilter","forks_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/forks","keys_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/teams","hooks_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/hooks","issue_events_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/issues/events{/number}","events_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/events","assignees_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/assignees{/user}","branches_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/branches{/branch}","tags_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/tags","blobs_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/git/refs{/sha}","trees_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/statuses/{sha}","languages_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/languages","stargazers_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/stargazers","contributors_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/contributors","subscribers_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/subscribers","subscription_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/subscription","commits_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/commits{/sha}","git_commits_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/git/commits{/sha}","comments_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/comments{/number}","issue_comment_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/issues/comments{/number}","contents_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/contents/{+path}","compare_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/merges","archive_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/downloads","issues_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/issues{/number}","pulls_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/pulls{/number}","milestones_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/milestones{/number}","notifications_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/labels{/name}","releases_url":"https://api.github.com/repos/Maks3w/zend-inputfilter/releases{/id}","created_at":"2015-05-23T22:45:45Z","updated_at":"2015-05-23T22:45:47Z","pushed_at":"2015-09-01T18:17:56Z","git_url":"git://github.com/Maks3w/zend-inputfilter.git","ssh_url":"git@github.com:Maks3w/zend-inputfilter.git","clone_url":"https://github.com/Maks3w/zend-inputfilter.git","svn_url":"https://github.com/Maks3w/zend-inputfilter","homepage":"https://github.com/zendframework/zf2","size":2171,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"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":"zendframework:master","ref":"master","sha":"cbd6df5a58ab8c1c29ab9d1e3b791c17520af4f8","user":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"repo":{"id":35280807,"name":"zend-inputfilter","full_name":"zendframework/zend-inputfilter","owner":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendframework/zend-inputfilter","description":"InputFilter component from Zend Framework","fork":false,"url":"https://api.github.com/repos/zendframework/zend-inputfilter","forks_url":"https://api.github.com/repos/zendframework/zend-inputfilter/forks","keys_url":"https://api.github.com/repos/zendframework/zend-inputfilter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendframework/zend-inputfilter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendframework/zend-inputfilter/teams","hooks_url":"https://api.github.com/repos/zendframework/zend-inputfilter/hooks","issue_events_url":"https://api.github.com/repos/zendframework/zend-inputfilter/issues/events{/number}","events_url":"https://api.github.com/repos/zendframework/zend-inputfilter/events","assignees_url":"https://api.github.com/repos/zendframework/zend-inputfilter/assignees{/user}","branches_url":"https://api.github.com/repos/zendframework/zend-inputfilter/branches{/branch}","tags_url":"https://api.github.com/repos/zendframework/zend-inputfilter/tags","blobs_url":"https://api.github.com/repos/zendframework/zend-inputfilter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendframework/zend-inputfilter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendframework/zend-inputfilter/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendframework/zend-inputfilter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendframework/zend-inputfilter/statuses/{sha}","languages_url":"https://api.github.com/repos/zendframework/zend-inputfilter/languages","stargazers_url":"https://api.github.com/repos/zendframework/zend-inputfilter/stargazers","contributors_url":"https://api.github.com/repos/zendframework/zend-inputfilter/contributors","subscribers_url":"https://api.github.com/repos/zendframework/zend-inputfilter/subscribers","subscription_url":"https://api.github.com/repos/zendframework/zend-inputfilter/subscription","commits_url":"https://api.github.com/repos/zendframework/zend-inputfilter/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendframework/zend-inputfilter/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendframework/zend-inputfilter/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendframework/zend-inputfilter/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendframework/zend-inputfilter/contents/{+path}","compare_url":"https://api.github.com/repos/zendframework/zend-inputfilter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendframework/zend-inputfilter/merges","archive_url":"https://api.github.com/repos/zendframework/zend-inputfilter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendframework/zend-inputfilter/downloads","issues_url":"https://api.github.com/repos/zendframework/zend-inputfilter/issues{/number}","pulls_url":"https://api.github.com/repos/zendframework/zend-inputfilter/pulls{/number}","milestones_url":"https://api.github.com/repos/zendframework/zend-inputfilter/milestones{/number}","notifications_url":"https://api.github.com/repos/zendframework/zend-inputfilter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendframework/zend-inputfilter/labels{/name}","releases_url":"https://api.github.com/repos/zendframework/zend-inputfilter/releases{/id}","created_at":"2015-05-08T13:28:01Z","updated_at":"2015-08-21T16:37:21Z","pushed_at":"2015-09-01T18:29:44Z","git_url":"git://github.com/zendframework/zend-inputfilter.git","ssh_url":"git@github.com:zendframework/zend-inputfilter.git","clone_url":"https://github.com/zendframework/zend-inputfilter.git","svn_url":"https://github.com/zendframework/zend-inputfilter","homepage":"https://github.com/zendframework/zf2","size":3771,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":14,"forks":10,"open_issues":14,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-inputfilter/pulls/24"},"html":{"href":"https://github.com/zendframework/zend-inputfilter/pull/24"},"issue":{"href":"https://api.github.com/repos/zendframework/zend-inputfilter/issues/24"},"comments":{"href":"https://api.github.com/repos/zendframework/zend-inputfilter/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/zendframework/zend-inputfilter/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/zendframework/zend-inputfilter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendframework/zend-inputfilter/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/zendframework/zend-inputfilter/statuses/d743878d0d734a9e7b7df98b12a9371901e777ec"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"comments":7,"review_comments":6,"commits":6,"additions":418,"deletions":255,"changed_files":8}}