{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-php/issues/90","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-php","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-php/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-php/issues/90/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-php/issues/90/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-php/issues/90","id":169822007,"number":90,"title":"InvalidArgumentException","user":{"login":"adhiravishankar","id":3884741,"avatar_url":"https://avatars.githubusercontent.com/u/3884741?v=3","gravatar_id":"","url":"https://api.github.com/users/adhiravishankar","html_url":"https://github.com/adhiravishankar","followers_url":"https://api.github.com/users/adhiravishankar/followers","following_url":"https://api.github.com/users/adhiravishankar/following{/other_user}","gists_url":"https://api.github.com/users/adhiravishankar/gists{/gist_id}","starred_url":"https://api.github.com/users/adhiravishankar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adhiravishankar/subscriptions","organizations_url":"https://api.github.com/users/adhiravishankar/orgs","repos_url":"https://api.github.com/users/adhiravishankar/repos","events_url":"https://api.github.com/users/adhiravishankar/events{/privacy}","received_events_url":"https://api.github.com/users/adhiravishankar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-07T23:21:00Z","updated_at":"2016-08-07T23:22:09Z","closed_at":"2016-08-07T23:21:53Z","body":"After the change to PSR7, Request now returns an [InvalidArgumentException] Invalid resource type: array on exists function in Object in Storage:\r\n$exists = $bucket->object('object')->exists();\r\n\r\nThe proposed fix is on the RequestBuilder class under build is to change it from \r\n\r\nreturn new Request(\r\n            $action['httpMethod'],\r\n            $uri,\r\n            ['Content-Type' => 'application/json'],\r\n            $body ? json_encode($body) : []\r\n        );\r\n\r\nto\r\n\r\nreturn new Request(\r\n            $action['httpMethod'],\r\n            $uri,\r\n            ['Content-Type' => 'application/json'],\r\n            $body ? json_encode($body) : null\r\n        );\r\n\r\nThis will get PSR7 to register the body as empty and proceed as such. Thanks!"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-php/issues/comments/238115329","html_url":"https://github.com/GoogleCloudPlatform/gcloud-php/issues/90#issuecomment-238115329","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-php/issues/90","id":238115329,"user":{"login":"adhiravishankar","id":3884741,"avatar_url":"https://avatars.githubusercontent.com/u/3884741?v=3","gravatar_id":"","url":"https://api.github.com/users/adhiravishankar","html_url":"https://github.com/adhiravishankar","followers_url":"https://api.github.com/users/adhiravishankar/followers","following_url":"https://api.github.com/users/adhiravishankar/following{/other_user}","gists_url":"https://api.github.com/users/adhiravishankar/gists{/gist_id}","starred_url":"https://api.github.com/users/adhiravishankar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adhiravishankar/subscriptions","organizations_url":"https://api.github.com/users/adhiravishankar/orgs","repos_url":"https://api.github.com/users/adhiravishankar/repos","events_url":"https://api.github.com/users/adhiravishankar/events{/privacy}","received_events_url":"https://api.github.com/users/adhiravishankar/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T23:22:09Z","updated_at":"2016-08-07T23:22:09Z","body":"Sorry, I just noticed this was fixed on the latest release!"}}
{"actor":{"display_login":"adhiravishankar"}}