Skip to content

Commit 5aa8760

Browse files
committed
Merge pull request #841 from bshaffer/issue-832
mention removal of loadServiceAccountJson in UPGRADING.md
2 parents dd88a82 + 7046e4d commit 5aa8760

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

UPGRADING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,24 @@ $user_to_impersonate = '[email protected]';
141141
$client->setSubject($user_to_impersonate);
142142
```
143143

144+
Additionally, `Google_Client::loadServiceAccountJson` has been removed in favor
145+
of `Google_Client::setAuthConfig`:
146+
147+
**Before**
148+
149+
```php
150+
$scopes = [ Google_Service_Books::BOOKS ];
151+
$client->loadServiceAccountJson('/path/to/service-account.json', $scopes);
152+
```
153+
154+
**After**
155+
156+
```php
157+
$scopes = [ Google_Service_Books::BOOKS ];
158+
$client->setAuthConfig('/path/to/service-account.json');
159+
$client->setScopes($scopes);
160+
```
161+
144162
## `Google_Auth_AppIdentity` has been removed
145163

146164
For App Engine authentication, we now use the underlying [`google/auth`][Google Auth] and

0 commit comments

Comments
 (0)