diff --git a/Datastore/owlbot.py b/Datastore/owlbot.py index af12dfa22c96..f4967041f8c0 100644 --- a/Datastore/owlbot.py +++ b/Datastore/owlbot.py @@ -30,9 +30,13 @@ # Added so that we can pass copy_excludes in the owlbot_main() call _tracked_paths.add(src) -php.owlbot_main(src=src, dest=dest) - - +php.owlbot_main( + src=src, + dest=dest, + copy_excludes=[ + src / "src/V1/TransactionOptions/ReadOnly.php" + ] +) # document and utilize apiEndpoint instead of serviceAddress s.replace( @@ -68,6 +72,15 @@ search, replace) +# remove ReadOnly class_alias code +s.replace( + "src/V*/**/PBReadOnly.php", + r"^// Adding a class alias for backwards compatibility with the \"readonly\" keyword.$" + + "\n" + + r"^class_alias\(PBReadOnly::class, __NAMESPACE__ . '\\ReadOnly'\);$" + + "\n", + '') + ### [START] protoc backwards compatibility fixes # roll back to private properties. diff --git a/Firestore/owlbot.py b/Firestore/owlbot.py index fb32446a356d..da1566156061 100644 --- a/Firestore/owlbot.py +++ b/Firestore/owlbot.py @@ -39,6 +39,7 @@ copy_excludes=[ src / '*/src/V1/FirestoreClient.php', src / '*/src/Admin/V1/FirestoreAdminClient.php', + src / "*/src/V1/TransactionOptions/ReadOnly.php", ] ) @@ -115,6 +116,15 @@ r'@group admin', '@group firestore-admin') +# remove ReadOnly class_alias code +s.replace( + "src/V*/**/PBReadOnly.php", + r"^// Adding a class alias for backwards compatibility with the \"readonly\" keyword.$" + + "\n" + + r"^class_alias\(PBReadOnly::class, __NAMESPACE__ . '\\ReadOnly'\);$" + + "\n", + '') + ### [START] protoc backwards compatibility fixes # roll back to private properties. diff --git a/Spanner/owlbot.py b/Spanner/owlbot.py index 20aceb70172d..f50286b7a758 100644 --- a/Spanner/owlbot.py +++ b/Spanner/owlbot.py @@ -35,12 +35,11 @@ src=src, dest=dest, copy_excludes=[ - src / "*/src/V1/SpannerClient.php" + src / "*/src/V1/SpannerClient.php", + src / "*/src/V1/TransactionOptions/ReadOnly.php", ] ) - - # Spanner Database Admin also lives here admin_library = Path(f"../{php.STAGING_DIR}/Spanner/v1/Admin/Database/v1").resolve() @@ -108,6 +107,15 @@ '@group instance', '@group spanner-admin-instance') +# remove ReadOnly class_alias code +s.replace( + "src/V*/**/PBReadOnly.php", + r"^// Adding a class alias for backwards compatibility with the \"readonly\" keyword.$" + + "\n" + + r"^class_alias\(PBReadOnly::class, __NAMESPACE__ . '\\ReadOnly'\);$" + + "\n", + '') + ## START fixing commit() breaking change # move $mutations back into commit() signature