{"action":"closed","number":26350,"pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/26350","id":227764151,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NzY0MTUx","html_url":"https://github.com/laravel/framework/pull/26350","diff_url":"https://github.com/laravel/framework/pull/26350.diff","patch_url":"https://github.com/laravel/framework/pull/26350.patch","issue_url":"https://api.github.com/repos/laravel/framework/issues/26350","number":26350,"state":"closed","locked":false,"title":"[5.8] Fix TrimStrings middleware for excluded array attributes","user":{"login":"jeromejaglale","id":3597814,"node_id":"MDQ6VXNlcjM1OTc4MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3597814?v=4","gravatar_id":"","url":"https://api.github.com/users/jeromejaglale","html_url":"https://github.com/jeromejaglale","followers_url":"https://api.github.com/users/jeromejaglale/followers","following_url":"https://api.github.com/users/jeromejaglale/following{/other_user}","gists_url":"https://api.github.com/users/jeromejaglale/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromejaglale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromejaglale/subscriptions","organizations_url":"https://api.github.com/users/jeromejaglale/orgs","repos_url":"https://api.github.com/users/jeromejaglale/repos","events_url":"https://api.github.com/users/jeromejaglale/events{/privacy}","received_events_url":"https://api.github.com/users/jeromejaglale/received_events","type":"User","site_admin":false},"body":"**Problem**\r\nIn TrimStrings (middleware class), array attributes declared in $except are ignored: the array values are trimmed anyway.\r\n\r\n**This pull request contains**\r\n- a unit test for TrimStrings including a test for that special case\r\n- a fix\r\n\r\n**What the fix does**\r\nIn the parent class TransformsRequest.php, the attribute name is passed to the cleanArray() function (as an optional parameter). It's then passed to the cleanValue() function as key. This allows the behaviour with $except to work properly in TrimStrings.\r\n\r\n**Notes**\r\nI'm not sure whether it's a proper way to do it, please let me know if there's a better way and feel free to modify this PR or implement a fix differently. Thank you.","created_at":"2018-11-01T21:23:11Z","updated_at":"2018-11-05T18:57:20Z","closed_at":"2018-11-05T18:57:20Z","merged_at":null,"merge_commit_sha":"5c708d6b2c5a6483326ccbec1387f2e662ca6c15","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/laravel/framework/pulls/26350/commits","review_comments_url":"https://api.github.com/repos/laravel/framework/pulls/26350/comments","review_comment_url":"https://api.github.com/repos/laravel/framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/laravel/framework/issues/26350/comments","statuses_url":"https://api.github.com/repos/laravel/framework/statuses/fda048a1b63c71629203449f013de788e63f1798","head":{"label":"jeromejaglale:fix-transforms-request-clean-array","ref":"fix-transforms-request-clean-array","sha":"fda048a1b63c71629203449f013de788e63f1798","user":{"login":"jeromejaglale","id":3597814,"node_id":"MDQ6VXNlcjM1OTc4MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3597814?v=4","gravatar_id":"","url":"https://api.github.com/users/jeromejaglale","html_url":"https://github.com/jeromejaglale","followers_url":"https://api.github.com/users/jeromejaglale/followers","following_url":"https://api.github.com/users/jeromejaglale/following{/other_user}","gists_url":"https://api.github.com/users/jeromejaglale/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromejaglale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromejaglale/subscriptions","organizations_url":"https://api.github.com/users/jeromejaglale/orgs","repos_url":"https://api.github.com/users/jeromejaglale/repos","events_url":"https://api.github.com/users/jeromejaglale/events{/privacy}","received_events_url":"https://api.github.com/users/jeromejaglale/received_events","type":"User","site_admin":false},"repo":{"id":155275126,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUyNzUxMjY=","name":"framework","full_name":"jeromejaglale/framework","private":false,"owner":{"login":"jeromejaglale","id":3597814,"node_id":"MDQ6VXNlcjM1OTc4MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3597814?v=4","gravatar_id":"","url":"https://api.github.com/users/jeromejaglale","html_url":"https://github.com/jeromejaglale","followers_url":"https://api.github.com/users/jeromejaglale/followers","following_url":"https://api.github.com/users/jeromejaglale/following{/other_user}","gists_url":"https://api.github.com/users/jeromejaglale/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromejaglale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromejaglale/subscriptions","organizations_url":"https://api.github.com/users/jeromejaglale/orgs","repos_url":"https://api.github.com/users/jeromejaglale/repos","events_url":"https://api.github.com/users/jeromejaglale/events{/privacy}","received_events_url":"https://api.github.com/users/jeromejaglale/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jeromejaglale/framework","description":null,"fork":true,"url":"https://api.github.com/repos/jeromejaglale/framework","forks_url":"https://api.github.com/repos/jeromejaglale/framework/forks","keys_url":"https://api.github.com/repos/jeromejaglale/framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeromejaglale/framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeromejaglale/framework/teams","hooks_url":"https://api.github.com/repos/jeromejaglale/framework/hooks","issue_events_url":"https://api.github.com/repos/jeromejaglale/framework/issues/events{/number}","events_url":"https://api.github.com/repos/jeromejaglale/framework/events","assignees_url":"https://api.github.com/repos/jeromejaglale/framework/assignees{/user}","branches_url":"https://api.github.com/repos/jeromejaglale/framework/branches{/branch}","tags_url":"https://api.github.com/repos/jeromejaglale/framework/tags","blobs_url":"https://api.github.com/repos/jeromejaglale/framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeromejaglale/framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeromejaglale/framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeromejaglale/framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeromejaglale/framework/statuses/{sha}","languages_url":"https://api.github.com/repos/jeromejaglale/framework/languages","stargazers_url":"https://api.github.com/repos/jeromejaglale/framework/stargazers","contributors_url":"https://api.github.com/repos/jeromejaglale/framework/contributors","subscribers_url":"https://api.github.com/repos/jeromejaglale/framework/subscribers","subscription_url":"https://api.github.com/repos/jeromejaglale/framework/subscription","commits_url":"https://api.github.com/repos/jeromejaglale/framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeromejaglale/framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeromejaglale/framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeromejaglale/framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeromejaglale/framework/contents/{+path}","compare_url":"https://api.github.com/repos/jeromejaglale/framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeromejaglale/framework/merges","archive_url":"https://api.github.com/repos/jeromejaglale/framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeromejaglale/framework/downloads","issues_url":"https://api.github.com/repos/jeromejaglale/framework/issues{/number}","pulls_url":"https://api.github.com/repos/jeromejaglale/framework/pulls{/number}","milestones_url":"https://api.github.com/repos/jeromejaglale/framework/milestones{/number}","notifications_url":"https://api.github.com/repos/jeromejaglale/framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeromejaglale/framework/labels{/name}","releases_url":"https://api.github.com/repos/jeromejaglale/framework/releases{/id}","deployments_url":"https://api.github.com/repos/jeromejaglale/framework/deployments","created_at":"2018-10-29T20:16:02Z","updated_at":"2018-10-29T20:16:09Z","pushed_at":"2018-11-02T21:13:24Z","git_url":"git://github.com/jeromejaglale/framework.git","ssh_url":"git@github.com:jeromejaglale/framework.git","clone_url":"https://github.com/jeromejaglale/framework.git","svn_url":"https://github.com/jeromejaglale/framework","homepage":"http://laravel.com","size":37096,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"5.7"}},"base":{"label":"laravel:master","ref":"master","sha":"71ed1625a7e773a69e3cc5b476aeaf0038e743d7","user":{"login":"laravel","id":958072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1ODA3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/958072?v=4","gravatar_id":"","url":"https://api.github.com/users/laravel","html_url":"https://github.com/laravel","followers_url":"https://api.github.com/users/laravel/followers","following_url":"https://api.github.com/users/laravel/following{/other_user}","gists_url":"https://api.github.com/users/laravel/gists{/gist_id}","starred_url":"https://api.github.com/users/laravel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laravel/subscriptions","organizations_url":"https://api.github.com/users/laravel/orgs","repos_url":"https://api.github.com/users/laravel/repos","events_url":"https://api.github.com/users/laravel/events{/privacy}","received_events_url":"https://api.github.com/users/laravel/received_events","type":"Organization","site_admin":false},"repo":{"id":7548986,"node_id":"MDEwOlJlcG9zaXRvcnk3NTQ4OTg2","name":"framework","full_name":"laravel/framework","private":false,"owner":{"login":"laravel","id":958072,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1ODA3Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/958072?v=4","gravatar_id":"","url":"https://api.github.com/users/laravel","html_url":"https://github.com/laravel","followers_url":"https://api.github.com/users/laravel/followers","following_url":"https://api.github.com/users/laravel/following{/other_user}","gists_url":"https://api.github.com/users/laravel/gists{/gist_id}","starred_url":"https://api.github.com/users/laravel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laravel/subscriptions","organizations_url":"https://api.github.com/users/laravel/orgs","repos_url":"https://api.github.com/users/laravel/repos","events_url":"https://api.github.com/users/laravel/events{/privacy}","received_events_url":"https://api.github.com/users/laravel/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/laravel/framework","description":null,"fork":false,"url":"https://api.github.com/repos/laravel/framework","forks_url":"https://api.github.com/repos/laravel/framework/forks","keys_url":"https://api.github.com/repos/laravel/framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laravel/framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laravel/framework/teams","hooks_url":"https://api.github.com/repos/laravel/framework/hooks","issue_events_url":"https://api.github.com/repos/laravel/framework/issues/events{/number}","events_url":"https://api.github.com/repos/laravel/framework/events","assignees_url":"https://api.github.com/repos/laravel/framework/assignees{/user}","branches_url":"https://api.github.com/repos/laravel/framework/branches{/branch}","tags_url":"https://api.github.com/repos/laravel/framework/tags","blobs_url":"https://api.github.com/repos/laravel/framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laravel/framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laravel/framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/laravel/framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laravel/framework/statuses/{sha}","languages_url":"https://api.github.com/repos/laravel/framework/languages","stargazers_url":"https://api.github.com/repos/laravel/framework/stargazers","contributors_url":"https://api.github.com/repos/laravel/framework/contributors","subscribers_url":"https://api.github.com/repos/laravel/framework/subscribers","subscription_url":"https://api.github.com/repos/laravel/framework/subscription","commits_url":"https://api.github.com/repos/laravel/framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/laravel/framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/laravel/framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/laravel/framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/laravel/framework/contents/{+path}","compare_url":"https://api.github.com/repos/laravel/framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laravel/framework/merges","archive_url":"https://api.github.com/repos/laravel/framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laravel/framework/downloads","issues_url":"https://api.github.com/repos/laravel/framework/issues{/number}","pulls_url":"https://api.github.com/repos/laravel/framework/pulls{/number}","milestones_url":"https://api.github.com/repos/laravel/framework/milestones{/number}","notifications_url":"https://api.github.com/repos/laravel/framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laravel/framework/labels{/name}","releases_url":"https://api.github.com/repos/laravel/framework/releases{/id}","deployments_url":"https://api.github.com/repos/laravel/framework/deployments","created_at":"2013-01-10T21:27:28Z","updated_at":"2018-11-05T18:13:59Z","pushed_at":"2018-11-05T18:55:16Z","git_url":"git://github.com/laravel/framework.git","ssh_url":"git@github.com:laravel/framework.git","clone_url":"https://github.com/laravel/framework.git","svn_url":"https://github.com/laravel/framework","homepage":"http://laravel.com","size":37207,"stargazers_count":14622,"watchers_count":14622,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5952,"mirror_url":null,"archived":false,"open_issues_count":198,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5952,"open_issues":198,"watchers":14622,"default_branch":"5.7"}},"_links":{"self":{"href":"https://api.github.com/repos/laravel/framework/pulls/26350"},"html":{"href":"https://github.com/laravel/framework/pull/26350"},"issue":{"href":"https://api.github.com/repos/laravel/framework/issues/26350"},"comments":{"href":"https://api.github.com/repos/laravel/framework/issues/26350/comments"},"review_comments":{"href":"https://api.github.com/repos/laravel/framework/pulls/26350/comments"},"review_comment":{"href":"https://api.github.com/repos/laravel/framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/laravel/framework/pulls/26350/commits"},"statuses":{"href":"https://api.github.com/repos/laravel/framework/statuses/fda048a1b63c71629203449f013de788e63f1798"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":false,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":5,"maintainer_can_modify":false,"commits":4,"additions":122,"deletions":3,"changed_files":2}}
{"actor":{"display_login":"taylorotwell"}}