|
43 | 43 | # copy GPBMetadata file to metadata |
44 | 44 | s.move(library / f'proto/src/GPBMetadata/Google/Spanner', f'metadata/') |
45 | 45 |
|
46 | | -# document and utilize apiEndpoint instead of serviceAddress |
47 | | -s.replace( |
48 | | - "**/Gapic/*GapicClient.php", |
49 | | - r"'serviceAddress' =>", |
50 | | - r"'apiEndpoint' =>") |
51 | | -s.replace( |
52 | | - "**/Gapic/*GapicClient.php", |
53 | | - r"@type string \$serviceAddress", |
54 | | - r"""@type string $serviceAddress |
55 | | - * **Deprecated**. This option will be removed in a future major release. Please |
56 | | - * utilize the `$apiEndpoint` option instead. |
57 | | - * @type string $apiEndpoint""") |
58 | | -s.replace( |
59 | | - "**/Gapic/*GapicClient.php", |
60 | | - r"\$transportConfig, and any \$serviceAddress", |
61 | | - r"$transportConfig, and any `$apiEndpoint`") |
62 | | - |
63 | | -# fix year |
64 | | -s.replace( |
65 | | - '**/Gapic/*GapicClient.php', |
66 | | - r'Copyright \d{4}', |
67 | | - r'Copyright 2017') |
68 | | -s.replace( |
69 | | - 'tests/**/V1/*Test.php', |
70 | | - r'Copyright \d{4}', |
71 | | - r'Copyright 2018') |
72 | | - |
73 | 46 | # Spanner Database Admin also lives here |
74 | 47 | admin_library = gapic.php_library( |
75 | 48 | service='spanner-admin-database', |
|
88 | 61 | # copy GPBMetadata file to metadata |
89 | 62 | s.move(admin_library / f'proto/src/GPBMetadata/Google/Spanner', f'metadata/') |
90 | 63 |
|
91 | | -# fix year |
92 | | -s.replace( |
93 | | - '**/Gapic/*GapicClient.php', |
94 | | - r'Copyright \d{4}', |
95 | | - r'Copyright 2017') |
96 | | -s.replace( |
97 | | - 'tests/**/Admin/Database/V1/*Test.php', |
98 | | - r'Copyright \d{4}', |
99 | | - r'Copyright 2018') |
100 | | - |
101 | 64 | # Spanner Instance Admin also lives here |
102 | 65 | admin_library = gapic.php_library( |
103 | 66 | service='spanner-admin-instance', |
|
116 | 79 | # copy GPBMetadata file to metadata |
117 | 80 | s.move(admin_library / f'proto/src/GPBMetadata/Google/Spanner', f'metadata/') |
118 | 81 |
|
| 82 | +# document and utilize apiEndpoint instead of serviceAddress |
| 83 | +s.replace( |
| 84 | + "**/Gapic/*GapicClient.php", |
| 85 | + r"'serviceAddress' =>", |
| 86 | + r"'apiEndpoint' =>") |
| 87 | +s.replace( |
| 88 | + "**/Gapic/*GapicClient.php", |
| 89 | + r"@type string \$serviceAddress", |
| 90 | + r"""@type string $serviceAddress |
| 91 | + * **Deprecated**. This option will be removed in a future major release. Please |
| 92 | + * utilize the `$apiEndpoint` option instead. |
| 93 | + * @type string $apiEndpoint""") |
| 94 | +s.replace( |
| 95 | + "**/Gapic/*GapicClient.php", |
| 96 | + r"\$transportConfig, and any \$serviceAddress", |
| 97 | + r"$transportConfig, and any `$apiEndpoint`") |
| 98 | + |
119 | 99 | # fix year |
120 | 100 | s.replace( |
121 | 101 | '**/Gapic/*GapicClient.php', |
122 | 102 | r'Copyright \d{4}', |
123 | 103 | r'Copyright 2017') |
124 | 104 | s.replace( |
125 | | - 'tests/**/Admin/Instance/V1/*Test.php', |
| 105 | + 'tests/**/V1/*Test.php', |
126 | 106 | r'Copyright \d{4}', |
127 | 107 | r'Copyright 2018') |
128 | 108 |
|
129 | | -# Use new namespaces |
130 | | -s.replace( |
131 | | - 'src/V1/Gapic/SpannerGapicClient.php', |
132 | | - r'ExecuteSqlRequest_QueryMode', |
133 | | - 'ExecuteSqlRequest\\QueryMode') |
134 | | - |
135 | | -s.replace( |
136 | | - 'src/V1/Gapic/SpannerGapicClient.php', |
137 | | - r'ExecuteBatchDmlRequest_Statement', |
138 | | - 'ExecuteBatchDmlRequest\\Statement') |
139 | | - |
140 | 109 | # Fix test namespaces |
141 | 110 | s.replace( |
142 | 111 | 'tests/Unit/Admin/Database/*/*.php', |
|
0 commit comments