Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
feat: switch PHP GAPICs to use default scopes (#3306)
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer authored Nov 13, 2020
1 parent 65490f3 commit f6ec598
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
'gcpApiConfigPath' => __DIR__ . '/../resources/{@xapiClass.clientConfigName}_grpc_config.json',
'credentialsConfig' => [
@if xapiClass.hasDefaultServiceScopes
'scopes' => self::$serviceScopes,
'defaultScopes' => self::$serviceScopes,
@end
],
'transportConfig' => [
Expand Down Expand Up @@ -168,7 +168,7 @@
{@""} * @@param string ${@param.name}
@end
* @@return string The formatted {@function.entityName} resource.
@if function.isResourceNameDeprecated
@if function.isResourceNameDeprecated
{@""} * @@deprecated Multi-pattern resource names will have unified formatting functions.
{@""} * This helper function will be deleted in the next major version.
@else
Expand Down
6 changes: 0 additions & 6 deletions src/main/resources/com/google/api/codegen/php/test.snip
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@
@if testClass.hasMissingDefaultOptions
@if testClass.missingDefaultServiceAddress
'serviceAddress' => '',

@end
@if testClass.missingDefaultServiceScopes
'credentialsConfig' => [
'scopes' => [],
],
@end
@end
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ class LibraryServiceGapicClient
'descriptorsConfigPath' => __DIR__ . '/../resources/library_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__ . '/../resources/library_service_grpc_config.json',
'credentialsConfig' => [
'scopes' => self::$serviceScopes,
'defaultScopes' => self::$serviceScopes,
],
'transportConfig' => [
'rest' => [
Expand Down Expand Up @@ -4763,7 +4763,7 @@ class MyProtoGapicClient
'descriptorsConfigPath' => __DIR__ . '/../resources/my_proto_descriptor_config.php',
'gcpApiConfigPath' => __DIR__ . '/../resources/my_proto_grpc_config.json',
'credentialsConfig' => [
'scopes' => self::$serviceScopes,
'defaultScopes' => self::$serviceScopes,
],
'transportConfig' => [
'rest' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,6 @@ class OperationsClientTest extends GeneratedTest
$options += [
'credentials' => $this->createCredentials(),
'serviceAddress' => '',
'credentialsConfig' => [
'scopes' => [],
],
];
return new OperationsClient($options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,6 @@ class NoTemplatesApiServiceClientTest extends GeneratedTest
$options += [
'credentials' => $this->createCredentials(),
'serviceAddress' => '',
'credentialsConfig' => [
'scopes' => [],
],
];
return new NoTemplatesApiServiceClient($options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2474,7 +2474,7 @@ class LibraryServiceGapicClient
'descriptorsConfigPath' => __DIR__ . '/../resources/library_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__ . '/../resources/library_service_grpc_config.json',
'credentialsConfig' => [
'scopes' => self::$serviceScopes,
'defaultScopes' => self::$serviceScopes,
],
'transportConfig' => [
'rest' => [
Expand Down Expand Up @@ -5878,7 +5878,7 @@ class MyProtoGapicClient
'descriptorsConfigPath' => __DIR__ . '/../resources/my_proto_descriptor_config.php',
'gcpApiConfigPath' => __DIR__ . '/../resources/my_proto_grpc_config.json',
'credentialsConfig' => [
'scopes' => self::$serviceScopes,
'defaultScopes' => self::$serviceScopes,
],
'transportConfig' => [
'rest' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2474,7 +2474,7 @@ class LibraryServiceGapicClient
'descriptorsConfigPath' => __DIR__ . '/../resources/library_service_descriptor_config.php',
'gcpApiConfigPath' => __DIR__ . '/../resources/library_service_grpc_config.json',
'credentialsConfig' => [
'scopes' => self::$serviceScopes,
'defaultScopes' => self::$serviceScopes,
],
'transportConfig' => [
'rest' => [
Expand Down Expand Up @@ -5878,7 +5878,7 @@ class MyProtoGapicClient
'descriptorsConfigPath' => __DIR__ . '/../resources/my_proto_descriptor_config.php',
'gcpApiConfigPath' => __DIR__ . '/../resources/my_proto_grpc_config.json',
'credentialsConfig' => [
'scopes' => self::$serviceScopes,
'defaultScopes' => self::$serviceScopes,
],
'transportConfig' => [
'rest' => [
Expand Down

0 comments on commit f6ec598

Please sign in to comment.