Skip to content

Commit e7e65fc

Browse files
authored
chore!: gencode for Spanner V2 (#7840)
1 parent af47e06 commit e7e65fc

File tree

210 files changed

+471
-2503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+471
-2503
lines changed

Spanner/owlbot.py

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -70,63 +70,15 @@
7070
# copy GPBMetadata file to metadata
7171
s.move(admin_library / f'proto/src/GPBMetadata/Google/Spanner', f'metadata/', merge=php._merge)
7272

73-
74-
# Fix test namespaces
75-
s.replace(
76-
'tests/Unit/Admin/Database/*/*.php',
77-
r'namespace Google\\Cloud\\Spanner\\Admin\\Database\\Tests\\Unit',
78-
r'namespace Google\\Cloud\\Spanner\\Tests\\Unit\\Admin\\Database')
79-
s.replace(
80-
'tests/Unit/Admin/Instance/*/*.php',
81-
r'namespace Google\\Cloud\\Spanner\\Admin\\Instance\\Tests\\Unit',
82-
r'namespace Google\\Cloud\\Spanner\\Tests\\Unit\\Admin\\Instance')
83-
84-
# fix test group
85-
s.replace(
86-
'tests/**/Admin/Database/V1/*Test.php',
87-
'@group database',
88-
'@group spanner-admin-database')
89-
73+
# remove class_alias code
9074
s.replace(
91-
'tests/**/Admin/Instance/V1/*Test.php',
92-
'@group instance',
93-
'@group spanner-admin-instance')
94-
95-
# fix protobuf bug (b/418528083)
96-
s.replace(
97-
"src/**/V*/**/*.php",
98-
"\$arr->count\(\)",
99-
"count($arr)")
100-
101-
102-
# remove ReadOnly class_alias code
103-
s.replace(
104-
"src/V*/**/PBReadOnly.php",
105-
r"^// Adding a class alias for backwards compatibility with the \"readonly\" keyword.$"
75+
"src/V*/**/*.php",
76+
r"^// Adding a class alias for backwards compatibility with the previous class name.$"
10677
+ "\n"
107-
+ r"^class_alias\(PBReadOnly::class, __NAMESPACE__ . '\\ReadOnly'\);$"
78+
+ r"^class_alias\(.*\);$"
10879
+ "\n",
10980
'')
11081

111-
### [START] protoc backwards compatibility fixes
112-
113-
# roll back to private properties.
114-
s.replace(
115-
"src/**/V*/**/*.php",
116-
r"Generated from protobuf field ([^\n]{0,})\n\s{5}\*/\n\s{4}protected \$",
117-
r"""Generated from protobuf field \1
118-
*/
119-
private $""")
120-
121-
# Replace "Unwrapped" with "Value" for method names.
122-
s.replace(
123-
"src/**/V*/**/*.php",
124-
r"public function ([s|g]\w{3,})Unwrapped",
125-
r"public function \1Value"
126-
)
127-
128-
### [END] protoc backwards compatibility fixes
129-
13082
# fix relative cloud.google.com links
13183
s.replace(
13284
"src/**/V*/**/*.php",

Spanner/src/Admin/Database/V1/AddSplitPointsRequest.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/Backup.php

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/BackupInfo.php

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/BackupInstancePartition.php

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/BackupSchedule.php

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/Backup_State.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

Spanner/src/Admin/Database/V1/Client/DatabaseAdminClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2023 Google LLC
3+
* Copyright 2024 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

Spanner/src/Admin/Database/V1/CopyBackupEncryptionConfig.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Spanner/src/Admin/Database/V1/CopyBackupEncryptionConfig_EncryptionType.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)