{"action":"created","comment":{"url":"https://api.github.com/repos/ably/ably-php/pulls/comments/49702517","id":49702517,"diff_hunk":"@@ -93,17 +93,24 @@ public function isUsingBasicAuth() {\n      * Stores the AuthOptions and TokenParams arguments as defaults for subsequent authorisations.\n      * @param array|null $tokenParams Requested token parameters\n      * @param array|null $authOptions Overridable auth options, if you don't wish to use the default ones\n-     * @param boolean|null $force Forces generation of a fresh token\n      * @return \\Ably\\Models\\TokenDetails The new token\n      */\n-    public function authorise( $tokenParams = array(), $authOptions = array(), $force = false ) {\n+    public function authorise( $tokenParams = array(), $authOptions = array() ) {\n \n         if ( !empty( $tokenParams ) ) {\n-            $this->defaultAuthoriseTokenParams = array_merge( $this->defaultAuthoriseTokenParams, $tokenParams );\n+            $tokenParamsCopy = $tokenParams;\n+            if ( isset( $tokenParamsCopy['timestamp'] ) ) unset( $tokenParamsCopy['timestamp'] );\n+\n+            $this->defaultAuthoriseTokenParams = array_merge( $this->defaultAuthoriseTokenParams, $tokenParamsCopy );\n         }\n         if ( !empty( $authOptions ) ) {\n-            $this->defaultAuthoriseAuthOptions = array_merge( $this->defaultAuthoriseAuthOptions, $authOptions );\n+            $authOptionsCopy = $authOptions;","path":"src/Auth.php","position":19,"original_position":19,"commit_id":"72ca3226c2fc3de547c3aa5ff0332657c9c105e9","original_commit_id":"72ca3226c2fc3de547c3aa5ff0332657c9c105e9","user":{"login":"bladeSk","id":4263742,"avatar_url":"https://avatars.githubusercontent.com/u/4263742?v=3","gravatar_id":"","url":"https://api.github.com/users/bladeSk","html_url":"https://github.com/bladeSk","followers_url":"https://api.github.com/users/bladeSk/followers","following_url":"https://api.github.com/users/bladeSk/following{/other_user}","gists_url":"https://api.github.com/users/bladeSk/gists{/gist_id}","starred_url":"https://api.github.com/users/bladeSk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bladeSk/subscriptions","organizations_url":"https://api.github.com/users/bladeSk/orgs","repos_url":"https://api.github.com/users/bladeSk/repos","events_url":"https://api.github.com/users/bladeSk/events{/privacy}","received_events_url":"https://api.github.com/users/bladeSk/received_events","type":"User","site_admin":false},"body":"In fact, no. PHP is totally backwards and arrays (but not objects!) are copied by value http://stackoverflow.com/a/1533214/388994 Hence the name authOptions**Copy**.","created_at":"2016-01-14T09:20:39Z","updated_at":"2016-01-14T09:20:39Z","html_url":"https://github.com/ably/ably-php/pull/24#discussion_r49702517","pull_request_url":"https://api.github.com/repos/ably/ably-php/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/ably/ably-php/pulls/comments/49702517"},"html":{"href":"https://github.com/ably/ably-php/pull/24#discussion_r49702517"},"pull_request":{"href":"https://api.github.com/repos/ably/ably-php/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/ably/ably-php/pulls/24","id":55901350,"html_url":"https://github.com/ably/ably-php/pull/24","diff_url":"https://github.com/ably/ably-php/pull/24.diff","patch_url":"https://github.com/ably/ably-php/pull/24.patch","issue_url":"https://api.github.com/repos/ably/ably-php/issues/24","number":24,"state":"open","locked":false,"title":"Moved `force` parameter out of authorise() to AuthOptions","user":{"login":"bladeSk","id":4263742,"avatar_url":"https://avatars.githubusercontent.com/u/4263742?v=3","gravatar_id":"","url":"https://api.github.com/users/bladeSk","html_url":"https://github.com/bladeSk","followers_url":"https://api.github.com/users/bladeSk/followers","following_url":"https://api.github.com/users/bladeSk/following{/other_user}","gists_url":"https://api.github.com/users/bladeSk/gists{/gist_id}","starred_url":"https://api.github.com/users/bladeSk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bladeSk/subscriptions","organizations_url":"https://api.github.com/users/bladeSk/orgs","repos_url":"https://api.github.com/users/bladeSk/repos","events_url":"https://api.github.com/users/bladeSk/events{/privacy}","received_events_url":"https://api.github.com/users/bladeSk/received_events","type":"User","site_admin":false},"body":"This PR fixes https://github.com/ably/ably-php/issues/23","created_at":"2016-01-13T14:07:32Z","updated_at":"2016-01-14T09:20:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c10fc1def406704785f95f50277d2e067a199f4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ably/ably-php/pulls/24/commits","review_comments_url":"https://api.github.com/repos/ably/ably-php/pulls/24/comments","review_comment_url":"https://api.github.com/repos/ably/ably-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ably/ably-php/issues/24/comments","statuses_url":"https://api.github.com/repos/ably/ably-php/statuses/72ca3226c2fc3de547c3aa5ff0332657c9c105e9","head":{"label":"bladeSk:master","ref":"master","sha":"72ca3226c2fc3de547c3aa5ff0332657c9c105e9","user":{"login":"bladeSk","id":4263742,"avatar_url":"https://avatars.githubusercontent.com/u/4263742?v=3","gravatar_id":"","url":"https://api.github.com/users/bladeSk","html_url":"https://github.com/bladeSk","followers_url":"https://api.github.com/users/bladeSk/followers","following_url":"https://api.github.com/users/bladeSk/following{/other_user}","gists_url":"https://api.github.com/users/bladeSk/gists{/gist_id}","starred_url":"https://api.github.com/users/bladeSk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bladeSk/subscriptions","organizations_url":"https://api.github.com/users/bladeSk/orgs","repos_url":"https://api.github.com/users/bladeSk/repos","events_url":"https://api.github.com/users/bladeSk/events{/privacy}","received_events_url":"https://api.github.com/users/bladeSk/received_events","type":"User","site_admin":false},"repo":{"id":33172870,"name":"ably-php","full_name":"bladeSk/ably-php","owner":{"login":"bladeSk","id":4263742,"avatar_url":"https://avatars.githubusercontent.com/u/4263742?v=3","gravatar_id":"","url":"https://api.github.com/users/bladeSk","html_url":"https://github.com/bladeSk","followers_url":"https://api.github.com/users/bladeSk/followers","following_url":"https://api.github.com/users/bladeSk/following{/other_user}","gists_url":"https://api.github.com/users/bladeSk/gists{/gist_id}","starred_url":"https://api.github.com/users/bladeSk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bladeSk/subscriptions","organizations_url":"https://api.github.com/users/bladeSk/orgs","repos_url":"https://api.github.com/users/bladeSk/repos","events_url":"https://api.github.com/users/bladeSk/events{/privacy}","received_events_url":"https://api.github.com/users/bladeSk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bladeSk/ably-php","description":"Ably real-time messaging. REST client library for PHP","fork":true,"url":"https://api.github.com/repos/bladeSk/ably-php","forks_url":"https://api.github.com/repos/bladeSk/ably-php/forks","keys_url":"https://api.github.com/repos/bladeSk/ably-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bladeSk/ably-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bladeSk/ably-php/teams","hooks_url":"https://api.github.com/repos/bladeSk/ably-php/hooks","issue_events_url":"https://api.github.com/repos/bladeSk/ably-php/issues/events{/number}","events_url":"https://api.github.com/repos/bladeSk/ably-php/events","assignees_url":"https://api.github.com/repos/bladeSk/ably-php/assignees{/user}","branches_url":"https://api.github.com/repos/bladeSk/ably-php/branches{/branch}","tags_url":"https://api.github.com/repos/bladeSk/ably-php/tags","blobs_url":"https://api.github.com/repos/bladeSk/ably-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bladeSk/ably-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bladeSk/ably-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/bladeSk/ably-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bladeSk/ably-php/statuses/{sha}","languages_url":"https://api.github.com/repos/bladeSk/ably-php/languages","stargazers_url":"https://api.github.com/repos/bladeSk/ably-php/stargazers","contributors_url":"https://api.github.com/repos/bladeSk/ably-php/contributors","subscribers_url":"https://api.github.com/repos/bladeSk/ably-php/subscribers","subscription_url":"https://api.github.com/repos/bladeSk/ably-php/subscription","commits_url":"https://api.github.com/repos/bladeSk/ably-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/bladeSk/ably-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/bladeSk/ably-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/bladeSk/ably-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/bladeSk/ably-php/contents/{+path}","compare_url":"https://api.github.com/repos/bladeSk/ably-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bladeSk/ably-php/merges","archive_url":"https://api.github.com/repos/bladeSk/ably-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bladeSk/ably-php/downloads","issues_url":"https://api.github.com/repos/bladeSk/ably-php/issues{/number}","pulls_url":"https://api.github.com/repos/bladeSk/ably-php/pulls{/number}","milestones_url":"https://api.github.com/repos/bladeSk/ably-php/milestones{/number}","notifications_url":"https://api.github.com/repos/bladeSk/ably-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bladeSk/ably-php/labels{/name}","releases_url":"https://api.github.com/repos/bladeSk/ably-php/releases{/id}","created_at":"2015-03-31T08:04:03Z","updated_at":"2016-01-12T11:57:31Z","pushed_at":"2016-01-13T14:03:53Z","git_url":"git://github.com/bladeSk/ably-php.git","ssh_url":"git@github.com:bladeSk/ably-php.git","clone_url":"https://github.com/bladeSk/ably-php.git","svn_url":"https://github.com/bladeSk/ably-php","homepage":"","size":716,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"ably:master","ref":"master","sha":"cd4fa2c35d98b08ceff49a3faaa1504f2452bdbe","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":7289345,"name":"ably-php","full_name":"ably/ably-php","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/ably-php","description":"Ably real-time messaging. REST client library for PHP","fork":false,"url":"https://api.github.com/repos/ably/ably-php","forks_url":"https://api.github.com/repos/ably/ably-php/forks","keys_url":"https://api.github.com/repos/ably/ably-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/ably-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/ably-php/teams","hooks_url":"https://api.github.com/repos/ably/ably-php/hooks","issue_events_url":"https://api.github.com/repos/ably/ably-php/issues/events{/number}","events_url":"https://api.github.com/repos/ably/ably-php/events","assignees_url":"https://api.github.com/repos/ably/ably-php/assignees{/user}","branches_url":"https://api.github.com/repos/ably/ably-php/branches{/branch}","tags_url":"https://api.github.com/repos/ably/ably-php/tags","blobs_url":"https://api.github.com/repos/ably/ably-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/ably-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/ably-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/ably-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/ably-php/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/ably-php/languages","stargazers_url":"https://api.github.com/repos/ably/ably-php/stargazers","contributors_url":"https://api.github.com/repos/ably/ably-php/contributors","subscribers_url":"https://api.github.com/repos/ably/ably-php/subscribers","subscription_url":"https://api.github.com/repos/ably/ably-php/subscription","commits_url":"https://api.github.com/repos/ably/ably-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/ably-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/ably-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/ably-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/ably-php/contents/{+path}","compare_url":"https://api.github.com/repos/ably/ably-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/ably-php/merges","archive_url":"https://api.github.com/repos/ably/ably-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/ably-php/downloads","issues_url":"https://api.github.com/repos/ably/ably-php/issues{/number}","pulls_url":"https://api.github.com/repos/ably/ably-php/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/ably-php/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/ably-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/ably-php/labels{/name}","releases_url":"https://api.github.com/repos/ably/ably-php/releases{/id}","created_at":"2012-12-22T18:59:01Z","updated_at":"2015-05-18T09:56:41Z","pushed_at":"2016-01-13T14:07:32Z","git_url":"git://github.com/ably/ably-php.git","ssh_url":"git@github.com:ably/ably-php.git","clone_url":"https://github.com/ably/ably-php.git","svn_url":"https://github.com/ably/ably-php","homepage":"","size":718,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ably/ably-php/pulls/24"},"html":{"href":"https://github.com/ably/ably-php/pull/24"},"issue":{"href":"https://api.github.com/repos/ably/ably-php/issues/24"},"comments":{"href":"https://api.github.com/repos/ably/ably-php/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/ably/ably-php/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/ably/ably-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ably/ably-php/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/ably/ably-php/statuses/72ca3226c2fc3de547c3aa5ff0332657c9c105e9"}}}}