{"action":"closed","number":399,"pull_request":{"url":"https://api.github.com/repos/Respect/Validation/pulls/399","id":44052345,"html_url":"https://github.com/Respect/Validation/pull/399","diff_url":"https://github.com/Respect/Validation/pull/399.diff","patch_url":"https://github.com/Respect/Validation/pull/399.patch","issue_url":"https://api.github.com/repos/Respect/Validation/issues/399","number":399,"state":"closed","locked":false,"title":"Update conversion to strings on exceptions","user":{"login":"henriquemoody","id":154023,"avatar_url":"https://avatars.githubusercontent.com/u/154023?v=3","gravatar_id":"","url":"https://api.github.com/users/henriquemoody","html_url":"https://github.com/henriquemoody","followers_url":"https://api.github.com/users/henriquemoody/followers","following_url":"https://api.github.com/users/henriquemoody/following{/other_user}","gists_url":"https://api.github.com/users/henriquemoody/gists{/gist_id}","starred_url":"https://api.github.com/users/henriquemoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henriquemoody/subscriptions","organizations_url":"https://api.github.com/users/henriquemoody/orgs","repos_url":"https://api.github.com/users/henriquemoody/repos","events_url":"https://api.github.com/users/henriquemoody/events{/privacy}","received_events_url":"https://api.github.com/users/henriquemoody/received_events","type":"User","site_admin":false},"body":"Update conversion to strings on exceptions\r\n\r\nMany changes were made on `ValidationException::stringify`:\r\n- Add support for instances of `Exception`;\r\n- Add support for instances of `Traversable`;\r\n- Add support for resources;\r\n- Improve `Array` conversion;\r\n- Improve `Object` conversion;\r\n- Improve conversion of all values by using JSON.\r\n\r\nNow, all the parameters of the exception classes are just converted to string when replacing parameters on exceptions, so the exception classes now keep the original value of all parameters.\r\n\r\nFix #395\r\n\r\n***\r\nSamples:\r\n\r\n```plain\r\n\"\"\r\n\"foo\"\r\nINF\r\n-INF\r\nNaN\r\n123\r\n123.456\r\n{ }\r\n{ false }\r\n{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }\r\n{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,  ...  }\r\n{ \"foo\": true, \"bar\": { \"baz\": 123, \"qux\": { 1, 2, 3 } } }\r\n{ \"foo\": true, \"bar\": { \"baz\": 123, \"qux\": { \"norf\": ... } } }\r\n{ { }, \"foo\" }\r\n{ { 1 }, \"foo\" }\r\n{ 1, { 2, { 3 } } }\r\n{ 1, { 2, { 3, ... } } }\r\n{ 1, { 2, { 3, ... } } }\r\n{ \"foo\", \"bar\" }\r\n{ \"foo\", -1 }\r\n\"stringify.phpt\"\r\n\"1988-09-09T23:59:59+00:00\"\r\n`[object] (stdClass: { })`\r\n`[object] (stdClass: { \"foo\": 1, \"bar\": false })`\r\n`[object] (stdClass: { \"name\": [object] (stdClass: ...) })`\r\n`[exception] (Exception: { \"message\": \"My message\", \"code\": 0, \"file\": \"%s:%d\" })`\r\n`[traversable] (ArrayIterator: { 1, 2, 3 })`\r\n`[traversable] (ArrayIterator: { \"a\": 1, \"b\": 2, \"c\": 3 })`\r\n`[resource] (stream-context)`\r\n`[resource] (stream)`\r\n`[resource] (xml)`\r\n{ `[object] (stdClass: { \"foo\": 1, \"bar\": false })`, { 42, 43 }, true, null, `[resource] (stream)` }\r\n```","created_at":"2015-09-02T22:51:29Z","updated_at":"2015-09-04T20:18:06Z","closed_at":"2015-09-04T20:18:06Z","merged_at":"2015-09-04T20:18:06Z","merge_commit_sha":"2a99172d3c62524fb082389668018372357a22bd","assignee":null,"milestone":{"url":"https://api.github.com/repos/Respect/Validation/milestones/9","html_url":"https://github.com/Respect/Validation/milestones/1.0","labels_url":"https://api.github.com/repos/Respect/Validation/milestones/9/labels","id":1166063,"number":9,"title":"1.0","description":"The first major version with the same Concrete API from 0.x versions.","creator":{"login":"henriquemoody","id":154023,"avatar_url":"https://avatars.githubusercontent.com/u/154023?v=3","gravatar_id":"","url":"https://api.github.com/users/henriquemoody","html_url":"https://github.com/henriquemoody","followers_url":"https://api.github.com/users/henriquemoody/followers","following_url":"https://api.github.com/users/henriquemoody/following{/other_user}","gists_url":"https://api.github.com/users/henriquemoody/gists{/gist_id}","starred_url":"https://api.github.com/users/henriquemoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henriquemoody/subscriptions","organizations_url":"https://api.github.com/users/henriquemoody/orgs","repos_url":"https://api.github.com/users/henriquemoody/repos","events_url":"https://api.github.com/users/henriquemoody/events{/privacy}","received_events_url":"https://api.github.com/users/henriquemoody/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":9,"state":"open","created_at":"2015-06-16T03:15:54Z","updated_at":"2015-09-04T20:18:06Z","due_on":"2015-10-24T02:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Respect/Validation/pulls/399/commits","review_comments_url":"https://api.github.com/repos/Respect/Validation/pulls/399/comments","review_comment_url":"https://api.github.com/repos/Respect/Validation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Respect/Validation/issues/399/comments","statuses_url":"https://api.github.com/repos/Respect/Validation/statuses/748b280c34c451ebaa0fa9fb1ec2767730a299ef","head":{"label":"henriquemoody:exception","ref":"exception","sha":"748b280c34c451ebaa0fa9fb1ec2767730a299ef","user":{"login":"henriquemoody","id":154023,"avatar_url":"https://avatars.githubusercontent.com/u/154023?v=3","gravatar_id":"","url":"https://api.github.com/users/henriquemoody","html_url":"https://github.com/henriquemoody","followers_url":"https://api.github.com/users/henriquemoody/followers","following_url":"https://api.github.com/users/henriquemoody/following{/other_user}","gists_url":"https://api.github.com/users/henriquemoody/gists{/gist_id}","starred_url":"https://api.github.com/users/henriquemoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henriquemoody/subscriptions","organizations_url":"https://api.github.com/users/henriquemoody/orgs","repos_url":"https://api.github.com/users/henriquemoody/repos","events_url":"https://api.github.com/users/henriquemoody/events{/privacy}","received_events_url":"https://api.github.com/users/henriquemoody/received_events","type":"User","site_admin":false},"repo":{"id":41831449,"name":"Validation","full_name":"henriquemoody/Validation","owner":{"login":"henriquemoody","id":154023,"avatar_url":"https://avatars.githubusercontent.com/u/154023?v=3","gravatar_id":"","url":"https://api.github.com/users/henriquemoody","html_url":"https://github.com/henriquemoody","followers_url":"https://api.github.com/users/henriquemoody/followers","following_url":"https://api.github.com/users/henriquemoody/following{/other_user}","gists_url":"https://api.github.com/users/henriquemoody/gists{/gist_id}","starred_url":"https://api.github.com/users/henriquemoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henriquemoody/subscriptions","organizations_url":"https://api.github.com/users/henriquemoody/orgs","repos_url":"https://api.github.com/users/henriquemoody/repos","events_url":"https://api.github.com/users/henriquemoody/events{/privacy}","received_events_url":"https://api.github.com/users/henriquemoody/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/henriquemoody/Validation","description":"The most awesome validation engine ever created for PHP","fork":true,"url":"https://api.github.com/repos/henriquemoody/Validation","forks_url":"https://api.github.com/repos/henriquemoody/Validation/forks","keys_url":"https://api.github.com/repos/henriquemoody/Validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/henriquemoody/Validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/henriquemoody/Validation/teams","hooks_url":"https://api.github.com/repos/henriquemoody/Validation/hooks","issue_events_url":"https://api.github.com/repos/henriquemoody/Validation/issues/events{/number}","events_url":"https://api.github.com/repos/henriquemoody/Validation/events","assignees_url":"https://api.github.com/repos/henriquemoody/Validation/assignees{/user}","branches_url":"https://api.github.com/repos/henriquemoody/Validation/branches{/branch}","tags_url":"https://api.github.com/repos/henriquemoody/Validation/tags","blobs_url":"https://api.github.com/repos/henriquemoody/Validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/henriquemoody/Validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/henriquemoody/Validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/henriquemoody/Validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/henriquemoody/Validation/statuses/{sha}","languages_url":"https://api.github.com/repos/henriquemoody/Validation/languages","stargazers_url":"https://api.github.com/repos/henriquemoody/Validation/stargazers","contributors_url":"https://api.github.com/repos/henriquemoody/Validation/contributors","subscribers_url":"https://api.github.com/repos/henriquemoody/Validation/subscribers","subscription_url":"https://api.github.com/repos/henriquemoody/Validation/subscription","commits_url":"https://api.github.com/repos/henriquemoody/Validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/henriquemoody/Validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/henriquemoody/Validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/henriquemoody/Validation/issues/comments{/number}","contents_url":"https://api.github.com/repos/henriquemoody/Validation/contents/{+path}","compare_url":"https://api.github.com/repos/henriquemoody/Validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/henriquemoody/Validation/merges","archive_url":"https://api.github.com/repos/henriquemoody/Validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/henriquemoody/Validation/downloads","issues_url":"https://api.github.com/repos/henriquemoody/Validation/issues{/number}","pulls_url":"https://api.github.com/repos/henriquemoody/Validation/pulls{/number}","milestones_url":"https://api.github.com/repos/henriquemoody/Validation/milestones{/number}","notifications_url":"https://api.github.com/repos/henriquemoody/Validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/henriquemoody/Validation/labels{/name}","releases_url":"https://api.github.com/repos/henriquemoody/Validation/releases{/id}","created_at":"2015-09-02T22:47:13Z","updated_at":"2015-09-02T22:47:14Z","pushed_at":"2015-09-04T20:11:46Z","git_url":"git://github.com/henriquemoody/Validation.git","ssh_url":"git@github.com:henriquemoody/Validation.git","clone_url":"https://github.com/henriquemoody/Validation.git","svn_url":"https://github.com/henriquemoody/Validation","homepage":"http://respect.li/Validation","size":6084,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Respect:master","ref":"master","sha":"c4e6f0875e95e68f2dda63d30c1c8e4038124a57","user":{"login":"Respect","id":354431,"avatar_url":"https://avatars.githubusercontent.com/u/354431?v=3","gravatar_id":"","url":"https://api.github.com/users/Respect","html_url":"https://github.com/Respect","followers_url":"https://api.github.com/users/Respect/followers","following_url":"https://api.github.com/users/Respect/following{/other_user}","gists_url":"https://api.github.com/users/Respect/gists{/gist_id}","starred_url":"https://api.github.com/users/Respect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Respect/subscriptions","organizations_url":"https://api.github.com/users/Respect/orgs","repos_url":"https://api.github.com/users/Respect/repos","events_url":"https://api.github.com/users/Respect/events{/privacy}","received_events_url":"https://api.github.com/users/Respect/received_events","type":"Organization","site_admin":false},"repo":{"id":931033,"name":"Validation","full_name":"Respect/Validation","owner":{"login":"Respect","id":354431,"avatar_url":"https://avatars.githubusercontent.com/u/354431?v=3","gravatar_id":"","url":"https://api.github.com/users/Respect","html_url":"https://github.com/Respect","followers_url":"https://api.github.com/users/Respect/followers","following_url":"https://api.github.com/users/Respect/following{/other_user}","gists_url":"https://api.github.com/users/Respect/gists{/gist_id}","starred_url":"https://api.github.com/users/Respect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Respect/subscriptions","organizations_url":"https://api.github.com/users/Respect/orgs","repos_url":"https://api.github.com/users/Respect/repos","events_url":"https://api.github.com/users/Respect/events{/privacy}","received_events_url":"https://api.github.com/users/Respect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Respect/Validation","description":"The most awesome validation engine ever created for PHP","fork":false,"url":"https://api.github.com/repos/Respect/Validation","forks_url":"https://api.github.com/repos/Respect/Validation/forks","keys_url":"https://api.github.com/repos/Respect/Validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Respect/Validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Respect/Validation/teams","hooks_url":"https://api.github.com/repos/Respect/Validation/hooks","issue_events_url":"https://api.github.com/repos/Respect/Validation/issues/events{/number}","events_url":"https://api.github.com/repos/Respect/Validation/events","assignees_url":"https://api.github.com/repos/Respect/Validation/assignees{/user}","branches_url":"https://api.github.com/repos/Respect/Validation/branches{/branch}","tags_url":"https://api.github.com/repos/Respect/Validation/tags","blobs_url":"https://api.github.com/repos/Respect/Validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Respect/Validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Respect/Validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/Respect/Validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Respect/Validation/statuses/{sha}","languages_url":"https://api.github.com/repos/Respect/Validation/languages","stargazers_url":"https://api.github.com/repos/Respect/Validation/stargazers","contributors_url":"https://api.github.com/repos/Respect/Validation/contributors","subscribers_url":"https://api.github.com/repos/Respect/Validation/subscribers","subscription_url":"https://api.github.com/repos/Respect/Validation/subscription","commits_url":"https://api.github.com/repos/Respect/Validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/Respect/Validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/Respect/Validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/Respect/Validation/issues/comments{/number}","contents_url":"https://api.github.com/repos/Respect/Validation/contents/{+path}","compare_url":"https://api.github.com/repos/Respect/Validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Respect/Validation/merges","archive_url":"https://api.github.com/repos/Respect/Validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Respect/Validation/downloads","issues_url":"https://api.github.com/repos/Respect/Validation/issues{/number}","pulls_url":"https://api.github.com/repos/Respect/Validation/pulls{/number}","milestones_url":"https://api.github.com/repos/Respect/Validation/milestones{/number}","notifications_url":"https://api.github.com/repos/Respect/Validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Respect/Validation/labels{/name}","releases_url":"https://api.github.com/repos/Respect/Validation/releases{/id}","created_at":"2010-09-22T16:08:05Z","updated_at":"2015-09-04T20:02:25Z","pushed_at":"2015-09-04T20:18:06Z","git_url":"git://github.com/Respect/Validation.git","ssh_url":"git@github.com:Respect/Validation.git","clone_url":"https://github.com/Respect/Validation.git","svn_url":"https://github.com/Respect/Validation","homepage":"http://respect.li/Validation","size":6084,"stargazers_count":2542,"watchers_count":2542,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":359,"mirror_url":null,"open_issues_count":24,"forks":359,"open_issues":24,"watchers":2542,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Respect/Validation/pulls/399"},"html":{"href":"https://github.com/Respect/Validation/pull/399"},"issue":{"href":"https://api.github.com/repos/Respect/Validation/issues/399"},"comments":{"href":"https://api.github.com/repos/Respect/Validation/issues/399/comments"},"review_comments":{"href":"https://api.github.com/repos/Respect/Validation/pulls/399/comments"},"review_comment":{"href":"https://api.github.com/repos/Respect/Validation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Respect/Validation/pulls/399/commits"},"statuses":{"href":"https://api.github.com/repos/Respect/Validation/statuses/748b280c34c451ebaa0fa9fb1ec2767730a299ef"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"henriquemoody","id":154023,"avatar_url":"https://avatars.githubusercontent.com/u/154023?v=3","gravatar_id":"","url":"https://api.github.com/users/henriquemoody","html_url":"https://github.com/henriquemoody","followers_url":"https://api.github.com/users/henriquemoody/followers","following_url":"https://api.github.com/users/henriquemoody/following{/other_user}","gists_url":"https://api.github.com/users/henriquemoody/gists{/gist_id}","starred_url":"https://api.github.com/users/henriquemoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henriquemoody/subscriptions","organizations_url":"https://api.github.com/users/henriquemoody/orgs","repos_url":"https://api.github.com/users/henriquemoody/repos","events_url":"https://api.github.com/users/henriquemoody/events{/privacy}","received_events_url":"https://api.github.com/users/henriquemoody/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":235,"deletions":151,"changed_files":28}}