{"action":"created","comment":{"url":"https://api.github.com/repos/pusher/pusher-php-server/pulls/comments/24303511","id":24303511,"diff_hunk":"@@ -0,0 +1,5 @@\n+<?php\n+\n+namespace Pusher\\Exceptions;","path":"src/Exceptions/PusherException.php","position":3,"original_position":3,"commit_id":"adbe9f800226084fdf4690c9c74c5cb93f7692c1","original_commit_id":"8f38bc8788da3145167516b789998bbba85da159","user":{"login":"vinkla","id":499192,"avatar_url":"https://avatars.githubusercontent.com/u/499192?v=3","gravatar_id":"","url":"https://api.github.com/users/vinkla","html_url":"https://github.com/vinkla","followers_url":"https://api.github.com/users/vinkla/followers","following_url":"https://api.github.com/users/vinkla/following{/other_user}","gists_url":"https://api.github.com/users/vinkla/gists{/gist_id}","starred_url":"https://api.github.com/users/vinkla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinkla/subscriptions","organizations_url":"https://api.github.com/users/vinkla/orgs","repos_url":"https://api.github.com/users/vinkla/repos","events_url":"https://api.github.com/users/vinkla/events{/privacy}","received_events_url":"https://api.github.com/users/vinkla/received_events","type":"User","site_admin":false},"body":"The question is if we should remove it entirely or move it to the root. I think we should remove it all together.","created_at":"2015-02-08T22:51:07Z","updated_at":"2015-02-08T22:51:07Z","html_url":"https://github.com/pusher/pusher-php-server/pull/25#discussion_r24303511","pull_request_url":"https://api.github.com/repos/pusher/pusher-php-server/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/pusher/pusher-php-server/pulls/comments/24303511"},"html":{"href":"https://github.com/pusher/pusher-php-server/pull/25#discussion_r24303511"},"pull_request":{"href":"https://api.github.com/repos/pusher/pusher-php-server/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/pusher/pusher-php-server/pulls/25","id":28888122,"html_url":"https://github.com/pusher/pusher-php-server/pull/25","diff_url":"https://github.com/pusher/pusher-php-server/pull/25.diff","patch_url":"https://github.com/pusher/pusher-php-server/pull/25.patch","issue_url":"https://api.github.com/repos/pusher/pusher-php-server/issues/25","number":25,"state":"open","locked":false,"title":"Add namespaces and update PHP support to 5.3","user":{"login":"vinkla","id":499192,"avatar_url":"https://avatars.githubusercontent.com/u/499192?v=3","gravatar_id":"","url":"https://api.github.com/users/vinkla","html_url":"https://github.com/vinkla","followers_url":"https://api.github.com/users/vinkla/followers","following_url":"https://api.github.com/users/vinkla/following{/other_user}","gists_url":"https://api.github.com/users/vinkla/gists{/gist_id}","starred_url":"https://api.github.com/users/vinkla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinkla/subscriptions","organizations_url":"https://api.github.com/users/vinkla/orgs","repos_url":"https://api.github.com/users/vinkla/repos","events_url":"https://api.github.com/users/vinkla/events{/privacy}","received_events_url":"https://api.github.com/users/vinkla/received_events","type":"User","site_admin":false},"body":"Adding namespaces for better usage within modern PHP applications. The current setup creates a global class `Pusher` that is injected everywhere with composers autoloader. This could cause problems for developers who want to use the Pusher package but only wants to inject it within their custom modules. \r\n\r\nInstead I've added namespaces and PSR-4 style autoloader. I'll describe it more below.\r\n\r\nWhat is new:\r\n- Added the namespace `Pusher`. To fetch the `Pusher` object we now have to included it at the top of the document.\r\n```php\r\n<?php\r\n\r\nnamespace Acme\\Services;\r\n\r\nuse Pusher\\Pusher;\r\n\r\nclass PusherManager\r\n{\r\n\tfunction __construct()\r\n\t{\r\n\t\t$this->pusher = new Pusher();\r\n\t}\r\n}\r\n```\r\n\r\n- Removed support for PHP version 5.2. Namespaces was added in version `5.3`. Therefore, version `5.2` can't be supported.\r\n- Separated the classes into multiple files. The `Pusher`, `PusherInstance` and `PusherException` now have their own files. \r\n\r\n\r\nWhat do you guys think? I know this is a major change. As I've read in #8 some of the new updates were used in another unofficial repository instead. This update is not as big. It just adds a new way of loading the classes. Hope you guys like it. Thanks.","created_at":"2015-02-08T22:32:10Z","updated_at":"2015-02-08T22:51:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab98d75cec639bdd478dea0e7b43541186e99ebf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pusher/pusher-php-server/pulls/25/commits","review_comments_url":"https://api.github.com/repos/pusher/pusher-php-server/pulls/25/comments","review_comment_url":"https://api.github.com/repos/pusher/pusher-php-server/pulls/comments/{number}","comments_url":"https://api.github.com/repos/pusher/pusher-php-server/issues/25/comments","statuses_url":"https://api.github.com/repos/pusher/pusher-php-server/statuses/adbe9f800226084fdf4690c9c74c5cb93f7692c1","head":{"label":"vinkla:namespaces","ref":"namespaces","sha":"adbe9f800226084fdf4690c9c74c5cb93f7692c1","user":{"login":"vinkla","id":499192,"avatar_url":"https://avatars.githubusercontent.com/u/499192?v=3","gravatar_id":"","url":"https://api.github.com/users/vinkla","html_url":"https://github.com/vinkla","followers_url":"https://api.github.com/users/vinkla/followers","following_url":"https://api.github.com/users/vinkla/following{/other_user}","gists_url":"https://api.github.com/users/vinkla/gists{/gist_id}","starred_url":"https://api.github.com/users/vinkla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinkla/subscriptions","organizations_url":"https://api.github.com/users/vinkla/orgs","repos_url":"https://api.github.com/users/vinkla/repos","events_url":"https://api.github.com/users/vinkla/events{/privacy}","received_events_url":"https://api.github.com/users/vinkla/received_events","type":"User","site_admin":false},"repo":{"id":30507369,"name":"pusher-php-server","full_name":"vinkla/pusher-php-server","owner":{"login":"vinkla","id":499192,"avatar_url":"https://avatars.githubusercontent.com/u/499192?v=3","gravatar_id":"","url":"https://api.github.com/users/vinkla","html_url":"https://github.com/vinkla","followers_url":"https://api.github.com/users/vinkla/followers","following_url":"https://api.github.com/users/vinkla/following{/other_user}","gists_url":"https://api.github.com/users/vinkla/gists{/gist_id}","starred_url":"https://api.github.com/users/vinkla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinkla/subscriptions","organizations_url":"https://api.github.com/users/vinkla/orgs","repos_url":"https://api.github.com/users/vinkla/repos","events_url":"https://api.github.com/users/vinkla/events{/privacy}","received_events_url":"https://api.github.com/users/vinkla/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vinkla/pusher-php-server","description":"PHP library for interacting with the Pusher HTTP API","fork":true,"url":"https://api.github.com/repos/vinkla/pusher-php-server","forks_url":"https://api.github.com/repos/vinkla/pusher-php-server/forks","keys_url":"https://api.github.com/repos/vinkla/pusher-php-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinkla/pusher-php-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinkla/pusher-php-server/teams","hooks_url":"https://api.github.com/repos/vinkla/pusher-php-server/hooks","issue_events_url":"https://api.github.com/repos/vinkla/pusher-php-server/issues/events{/number}","events_url":"https://api.github.com/repos/vinkla/pusher-php-server/events","assignees_url":"https://api.github.com/repos/vinkla/pusher-php-server/assignees{/user}","branches_url":"https://api.github.com/repos/vinkla/pusher-php-server/branches{/branch}","tags_url":"https://api.github.com/repos/vinkla/pusher-php-server/tags","blobs_url":"https://api.github.com/repos/vinkla/pusher-php-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinkla/pusher-php-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinkla/pusher-php-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinkla/pusher-php-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinkla/pusher-php-server/statuses/{sha}","languages_url":"https://api.github.com/repos/vinkla/pusher-php-server/languages","stargazers_url":"https://api.github.com/repos/vinkla/pusher-php-server/stargazers","contributors_url":"https://api.github.com/repos/vinkla/pusher-php-server/contributors","subscribers_url":"https://api.github.com/repos/vinkla/pusher-php-server/subscribers","subscription_url":"https://api.github.com/repos/vinkla/pusher-php-server/subscription","commits_url":"https://api.github.com/repos/vinkla/pusher-php-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinkla/pusher-php-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinkla/pusher-php-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinkla/pusher-php-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/vinkla/pusher-php-server/contents/{+path}","compare_url":"https://api.github.com/repos/vinkla/pusher-php-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinkla/pusher-php-server/merges","archive_url":"https://api.github.com/repos/vinkla/pusher-php-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinkla/pusher-php-server/downloads","issues_url":"https://api.github.com/repos/vinkla/pusher-php-server/issues{/number}","pulls_url":"https://api.github.com/repos/vinkla/pusher-php-server/pulls{/number}","milestones_url":"https://api.github.com/repos/vinkla/pusher-php-server/milestones{/number}","notifications_url":"https://api.github.com/repos/vinkla/pusher-php-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinkla/pusher-php-server/labels{/name}","releases_url":"https://api.github.com/repos/vinkla/pusher-php-server/releases{/id}","created_at":"2015-02-08T21:54:45Z","updated_at":"2015-02-08T21:54:46Z","pushed_at":"2015-02-08T22:49:40Z","git_url":"git://github.com/vinkla/pusher-php-server.git","ssh_url":"git@github.com:vinkla/pusher-php-server.git","clone_url":"https://github.com/vinkla/pusher-php-server.git","svn_url":"https://github.com/vinkla/pusher-php-server","homepage":"","size":187,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"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":"pusher:master","ref":"master","sha":"64ac86e757ed3349bc172b4069b972d99ba47400","user":{"login":"pusher","id":739550,"avatar_url":"https://avatars.githubusercontent.com/u/739550?v=3","gravatar_id":"","url":"https://api.github.com/users/pusher","html_url":"https://github.com/pusher","followers_url":"https://api.github.com/users/pusher/followers","following_url":"https://api.github.com/users/pusher/following{/other_user}","gists_url":"https://api.github.com/users/pusher/gists{/gist_id}","starred_url":"https://api.github.com/users/pusher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pusher/subscriptions","organizations_url":"https://api.github.com/users/pusher/orgs","repos_url":"https://api.github.com/users/pusher/repos","events_url":"https://api.github.com/users/pusher/events{/privacy}","received_events_url":"https://api.github.com/users/pusher/received_events","type":"Organization","site_admin":false},"repo":{"id":5249039,"name":"pusher-php-server","full_name":"pusher/pusher-php-server","owner":{"login":"pusher","id":739550,"avatar_url":"https://avatars.githubusercontent.com/u/739550?v=3","gravatar_id":"","url":"https://api.github.com/users/pusher","html_url":"https://github.com/pusher","followers_url":"https://api.github.com/users/pusher/followers","following_url":"https://api.github.com/users/pusher/following{/other_user}","gists_url":"https://api.github.com/users/pusher/gists{/gist_id}","starred_url":"https://api.github.com/users/pusher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pusher/subscriptions","organizations_url":"https://api.github.com/users/pusher/orgs","repos_url":"https://api.github.com/users/pusher/repos","events_url":"https://api.github.com/users/pusher/events{/privacy}","received_events_url":"https://api.github.com/users/pusher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pusher/pusher-php-server","description":"PHP library for interacting with the Pusher HTTP API","fork":false,"url":"https://api.github.com/repos/pusher/pusher-php-server","forks_url":"https://api.github.com/repos/pusher/pusher-php-server/forks","keys_url":"https://api.github.com/repos/pusher/pusher-php-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pusher/pusher-php-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pusher/pusher-php-server/teams","hooks_url":"https://api.github.com/repos/pusher/pusher-php-server/hooks","issue_events_url":"https://api.github.com/repos/pusher/pusher-php-server/issues/events{/number}","events_url":"https://api.github.com/repos/pusher/pusher-php-server/events","assignees_url":"https://api.github.com/repos/pusher/pusher-php-server/assignees{/user}","branches_url":"https://api.github.com/repos/pusher/pusher-php-server/branches{/branch}","tags_url":"https://api.github.com/repos/pusher/pusher-php-server/tags","blobs_url":"https://api.github.com/repos/pusher/pusher-php-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pusher/pusher-php-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pusher/pusher-php-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/pusher/pusher-php-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pusher/pusher-php-server/statuses/{sha}","languages_url":"https://api.github.com/repos/pusher/pusher-php-server/languages","stargazers_url":"https://api.github.com/repos/pusher/pusher-php-server/stargazers","contributors_url":"https://api.github.com/repos/pusher/pusher-php-server/contributors","subscribers_url":"https://api.github.com/repos/pusher/pusher-php-server/subscribers","subscription_url":"https://api.github.com/repos/pusher/pusher-php-server/subscription","commits_url":"https://api.github.com/repos/pusher/pusher-php-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/pusher/pusher-php-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/pusher/pusher-php-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/pusher/pusher-php-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/pusher/pusher-php-server/contents/{+path}","compare_url":"https://api.github.com/repos/pusher/pusher-php-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pusher/pusher-php-server/merges","archive_url":"https://api.github.com/repos/pusher/pusher-php-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pusher/pusher-php-server/downloads","issues_url":"https://api.github.com/repos/pusher/pusher-php-server/issues{/number}","pulls_url":"https://api.github.com/repos/pusher/pusher-php-server/pulls{/number}","milestones_url":"https://api.github.com/repos/pusher/pusher-php-server/milestones{/number}","notifications_url":"https://api.github.com/repos/pusher/pusher-php-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pusher/pusher-php-server/labels{/name}","releases_url":"https://api.github.com/repos/pusher/pusher-php-server/releases{/id}","created_at":"2012-07-31T17:21:19Z","updated_at":"2015-02-08T21:44:05Z","pushed_at":"2015-01-26T11:00:12Z","git_url":"git://github.com/pusher/pusher-php-server.git","ssh_url":"git@github.com:pusher/pusher-php-server.git","clone_url":"https://github.com/pusher/pusher-php-server.git","svn_url":"https://github.com/pusher/pusher-php-server","homepage":"","size":419,"stargazers_count":151,"watchers_count":151,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":8,"forks":79,"open_issues":8,"watchers":151,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pusher/pusher-php-server/pulls/25"},"html":{"href":"https://github.com/pusher/pusher-php-server/pull/25"},"issue":{"href":"https://api.github.com/repos/pusher/pusher-php-server/issues/25"},"comments":{"href":"https://api.github.com/repos/pusher/pusher-php-server/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/pusher/pusher-php-server/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/pusher/pusher-php-server/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/pusher/pusher-php-server/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/pusher/pusher-php-server/statuses/adbe9f800226084fdf4690c9c74c5cb93f7692c1"}}}}