{"action":"opened","number":17,"pull_request":{"url":"https://api.github.com/repos/Geocodio/geocodio-php/pulls/17","id":175161318,"html_url":"https://github.com/Geocodio/geocodio-php/pull/17","diff_url":"https://github.com/Geocodio/geocodio-php/pull/17.diff","patch_url":"https://github.com/Geocodio/geocodio-php/pull/17.patch","issue_url":"https://api.github.com/repos/Geocodio/geocodio-php/issues/17","number":17,"state":"open","locked":false,"title":"Update exception namespaces","user":{"login":"patrickcarlohickman","id":6036266,"avatar_url":"https://avatars2.githubusercontent.com/u/6036266?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickcarlohickman","html_url":"https://github.com/patrickcarlohickman","followers_url":"https://api.github.com/users/patrickcarlohickman/followers","following_url":"https://api.github.com/users/patrickcarlohickman/following{/other_user}","gists_url":"https://api.github.com/users/patrickcarlohickman/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickcarlohickman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickcarlohickman/subscriptions","organizations_url":"https://api.github.com/users/patrickcarlohickman/orgs","repos_url":"https://api.github.com/users/patrickcarlohickman/repos","events_url":"https://api.github.com/users/patrickcarlohickman/events{/privacy}","received_events_url":"https://api.github.com/users/patrickcarlohickman/received_events","type":"User","site_admin":false},"body":"There are a couple issues with the custom exceptions.\r\n\r\nFirst, the namespaces are not PSR4 compliant, so the exceptions will not be found by the Client. The exceptions live in the `Exceptions` subdirectory, but their namespace does not include this, so they won't be found.\r\n\r\nSecond, they all extend `Exception`, but they are all namespaced files and there is no `use` statement or FQCN, so they will look for an `Exception` class inside the current namespace of the file. This class doesn't exist, so this will also cause an error. I have prepended a slash to indicate the FQCN.\r\n\r\nThird, the Client needed to be updated to look for the exceptions in the correct place. Before the namespace change, the exception wouldn't load due to the PSR4 namespace violation. After the namespace change, the Client has to be updated to look at the correct namespace.\r\n\r\nI also added in a unit test that tests this one method and the exceptions that it calls. I don't know if you really want this test or not, as the need for it may completely go away with another issue that I will report. But, this is the test that I wrote while working on this code, so I went ahead and included it. I can remove it if you want.","created_at":"2018-03-15T06:45:44Z","updated_at":"2018-03-15T06:45:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Geocodio/geocodio-php/pulls/17/commits","review_comments_url":"https://api.github.com/repos/Geocodio/geocodio-php/pulls/17/comments","review_comment_url":"https://api.github.com/repos/Geocodio/geocodio-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Geocodio/geocodio-php/issues/17/comments","statuses_url":"https://api.github.com/repos/Geocodio/geocodio-php/statuses/3f274dd5646fedb7b7e5daa51168df290bc95b0c","head":{"label":"patrickcarlohickman:update-exception-namespaces","ref":"update-exception-namespaces","sha":"3f274dd5646fedb7b7e5daa51168df290bc95b0c","user":{"login":"patrickcarlohickman","id":6036266,"avatar_url":"https://avatars2.githubusercontent.com/u/6036266?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickcarlohickman","html_url":"https://github.com/patrickcarlohickman","followers_url":"https://api.github.com/users/patrickcarlohickman/followers","following_url":"https://api.github.com/users/patrickcarlohickman/following{/other_user}","gists_url":"https://api.github.com/users/patrickcarlohickman/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickcarlohickman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickcarlohickman/subscriptions","organizations_url":"https://api.github.com/users/patrickcarlohickman/orgs","repos_url":"https://api.github.com/users/patrickcarlohickman/repos","events_url":"https://api.github.com/users/patrickcarlohickman/events{/privacy}","received_events_url":"https://api.github.com/users/patrickcarlohickman/received_events","type":"User","site_admin":false},"repo":{"id":125060057,"name":"geocodio-php","full_name":"patrickcarlohickman/geocodio-php","owner":{"login":"patrickcarlohickman","id":6036266,"avatar_url":"https://avatars2.githubusercontent.com/u/6036266?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickcarlohickman","html_url":"https://github.com/patrickcarlohickman","followers_url":"https://api.github.com/users/patrickcarlohickman/followers","following_url":"https://api.github.com/users/patrickcarlohickman/following{/other_user}","gists_url":"https://api.github.com/users/patrickcarlohickman/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickcarlohickman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickcarlohickman/subscriptions","organizations_url":"https://api.github.com/users/patrickcarlohickman/orgs","repos_url":"https://api.github.com/users/patrickcarlohickman/repos","events_url":"https://api.github.com/users/patrickcarlohickman/events{/privacy}","received_events_url":"https://api.github.com/users/patrickcarlohickman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/patrickcarlohickman/geocodio-php","description":"PHP wrapper for the Geocod.io Address encoding library.","fork":true,"url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php","forks_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/forks","keys_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/teams","hooks_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/hooks","issue_events_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/issues/events{/number}","events_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/events","assignees_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/assignees{/user}","branches_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/branches{/branch}","tags_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/tags","blobs_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/statuses/{sha}","languages_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/languages","stargazers_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/stargazers","contributors_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/contributors","subscribers_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/subscribers","subscription_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/subscription","commits_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/contents/{+path}","compare_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/merges","archive_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/downloads","issues_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/issues{/number}","pulls_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/pulls{/number}","milestones_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/milestones{/number}","notifications_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/labels{/name}","releases_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/releases{/id}","deployments_url":"https://api.github.com/repos/patrickcarlohickman/geocodio-php/deployments","created_at":"2018-03-13T13:58:04Z","updated_at":"2018-03-15T05:34:56Z","pushed_at":"2018-03-15T06:35:24Z","git_url":"git://github.com/patrickcarlohickman/geocodio-php.git","ssh_url":"git@github.com:patrickcarlohickman/geocodio-php.git","clone_url":"https://github.com/patrickcarlohickman/geocodio-php.git","svn_url":"https://github.com/patrickcarlohickman/geocodio-php","homepage":null,"size":43,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Geocodio:master","ref":"master","sha":"bae8c950f035804efecd6547f1caf245d074f745","user":{"login":"Geocodio","id":6632163,"avatar_url":"https://avatars2.githubusercontent.com/u/6632163?v=4","gravatar_id":"","url":"https://api.github.com/users/Geocodio","html_url":"https://github.com/Geocodio","followers_url":"https://api.github.com/users/Geocodio/followers","following_url":"https://api.github.com/users/Geocodio/following{/other_user}","gists_url":"https://api.github.com/users/Geocodio/gists{/gist_id}","starred_url":"https://api.github.com/users/Geocodio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geocodio/subscriptions","organizations_url":"https://api.github.com/users/Geocodio/orgs","repos_url":"https://api.github.com/users/Geocodio/repos","events_url":"https://api.github.com/users/Geocodio/events{/privacy}","received_events_url":"https://api.github.com/users/Geocodio/received_events","type":"Organization","site_admin":false},"repo":{"id":16154676,"name":"geocodio-php","full_name":"Geocodio/geocodio-php","owner":{"login":"Geocodio","id":6632163,"avatar_url":"https://avatars2.githubusercontent.com/u/6632163?v=4","gravatar_id":"","url":"https://api.github.com/users/Geocodio","html_url":"https://github.com/Geocodio","followers_url":"https://api.github.com/users/Geocodio/followers","following_url":"https://api.github.com/users/Geocodio/following{/other_user}","gists_url":"https://api.github.com/users/Geocodio/gists{/gist_id}","starred_url":"https://api.github.com/users/Geocodio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Geocodio/subscriptions","organizations_url":"https://api.github.com/users/Geocodio/orgs","repos_url":"https://api.github.com/users/Geocodio/repos","events_url":"https://api.github.com/users/Geocodio/events{/privacy}","received_events_url":"https://api.github.com/users/Geocodio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Geocodio/geocodio-php","description":"PHP wrapper for the Geocod.io Address encoding library.","fork":false,"url":"https://api.github.com/repos/Geocodio/geocodio-php","forks_url":"https://api.github.com/repos/Geocodio/geocodio-php/forks","keys_url":"https://api.github.com/repos/Geocodio/geocodio-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Geocodio/geocodio-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Geocodio/geocodio-php/teams","hooks_url":"https://api.github.com/repos/Geocodio/geocodio-php/hooks","issue_events_url":"https://api.github.com/repos/Geocodio/geocodio-php/issues/events{/number}","events_url":"https://api.github.com/repos/Geocodio/geocodio-php/events","assignees_url":"https://api.github.com/repos/Geocodio/geocodio-php/assignees{/user}","branches_url":"https://api.github.com/repos/Geocodio/geocodio-php/branches{/branch}","tags_url":"https://api.github.com/repos/Geocodio/geocodio-php/tags","blobs_url":"https://api.github.com/repos/Geocodio/geocodio-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Geocodio/geocodio-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Geocodio/geocodio-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/Geocodio/geocodio-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Geocodio/geocodio-php/statuses/{sha}","languages_url":"https://api.github.com/repos/Geocodio/geocodio-php/languages","stargazers_url":"https://api.github.com/repos/Geocodio/geocodio-php/stargazers","contributors_url":"https://api.github.com/repos/Geocodio/geocodio-php/contributors","subscribers_url":"https://api.github.com/repos/Geocodio/geocodio-php/subscribers","subscription_url":"https://api.github.com/repos/Geocodio/geocodio-php/subscription","commits_url":"https://api.github.com/repos/Geocodio/geocodio-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/Geocodio/geocodio-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/Geocodio/geocodio-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/Geocodio/geocodio-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/Geocodio/geocodio-php/contents/{+path}","compare_url":"https://api.github.com/repos/Geocodio/geocodio-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Geocodio/geocodio-php/merges","archive_url":"https://api.github.com/repos/Geocodio/geocodio-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Geocodio/geocodio-php/downloads","issues_url":"https://api.github.com/repos/Geocodio/geocodio-php/issues{/number}","pulls_url":"https://api.github.com/repos/Geocodio/geocodio-php/pulls{/number}","milestones_url":"https://api.github.com/repos/Geocodio/geocodio-php/milestones{/number}","notifications_url":"https://api.github.com/repos/Geocodio/geocodio-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Geocodio/geocodio-php/labels{/name}","releases_url":"https://api.github.com/repos/Geocodio/geocodio-php/releases{/id}","deployments_url":"https://api.github.com/repos/Geocodio/geocodio-php/deployments","created_at":"2014-01-22T22:28:29Z","updated_at":"2018-03-14T01:43:32Z","pushed_at":"2018-03-14T01:43:38Z","git_url":"git://github.com/Geocodio/geocodio-php.git","ssh_url":"git@github.com:Geocodio/geocodio-php.git","clone_url":"https://github.com/Geocodio/geocodio-php.git","svn_url":"https://github.com/Geocodio/geocodio-php","homepage":null,"size":39,"stargazers_count":22,"watchers_count":22,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":13,"open_issues":1,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Geocodio/geocodio-php/pulls/17"},"html":{"href":"https://github.com/Geocodio/geocodio-php/pull/17"},"issue":{"href":"https://api.github.com/repos/Geocodio/geocodio-php/issues/17"},"comments":{"href":"https://api.github.com/repos/Geocodio/geocodio-php/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/Geocodio/geocodio-php/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/Geocodio/geocodio-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Geocodio/geocodio-php/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/Geocodio/geocodio-php/statuses/3f274dd5646fedb7b7e5daa51168df290bc95b0c"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":4,"additions":84,"deletions":13,"changed_files":6}}
{"actor":{"display_login":"patrickcarlohickman"}}