Skip to content

docs: fix ADC specific-JSON-key example in README#679

Open
SNO7E-G wants to merge 1 commit into
googleapis:mainfrom
SNO7E-G:docs/readme-fix-adc-json-key-example
Open

docs: fix ADC specific-JSON-key example in README#679
SNO7E-G wants to merge 1 commit into
googleapis:mainfrom
SNO7E-G:docs/readme-fix-adc-json-key-example

Conversation

@SNO7E-G

@SNO7E-G SNO7E-G commented Jul 23, 2026

Copy link
Copy Markdown

The "Call using a specific JSON key" example in the README does not parse and can't be
copy-pasted as-is. This fixes three issues in that snippet:

  • A trailing comma (,) instead of a semicolon after the first new ServiceAccountCredentials(...) assignment — a parse error.
  • The match arms reference $scope, but the variable defined above is $scopes.
  • Missing use imports for ServiceAccountCredentials, UserRefreshCredentials, and FetchAuthTokenCache.

Documentation only — no code or behavior changes. Verified the corrected snippet with php -l.

The "Call using a specific JSON key" snippet did not parse:
- trailing comma after the first ServiceAccountCredentials assignment
- $scope used in the match arms where the defined variable is $scopes
- missing imports for ServiceAccountCredentials, UserRefreshCredentials
  and FetchAuthTokenCache
@SNO7E-G
SNO7E-G requested a review from a team as a code owner July 23, 2026 19:36
@Hectorhammett

Copy link
Copy Markdown
Contributor

This looks good to me! Thanks for the contribution!

Can you take a look @bshaffer ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants