diff --git a/Core/src/Testing/GcTestListener.php b/Core/src/Testing/GcTestListener.php
index db16b91fbbc5..ea3bd8bc1b84 100644
--- a/Core/src/Testing/GcTestListener.php
+++ b/Core/src/Testing/GcTestListener.php
@@ -15,6 +15,8 @@
* limitations under the License.
*/
+namespace Google\Cloud\Core\Testing;
+
use PHPUnit\Framework\TestListener;
use Yoast\PHPUnitPolyfills\TestListeners\TestListenerDefaultImplementation;
diff --git a/Datastream/owlbot.py b/Datastream/owlbot.py
index 8db5cd6c52bd..1447f25b99e1 100644
--- a/Datastream/owlbot.py
+++ b/Datastream/owlbot.py
@@ -30,7 +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 / "**/[A-Z]*_*.php"
+ ]
+)
# document and utilize apiEndpoint instead of serviceAddress
s.replace(
@@ -50,6 +56,15 @@
r"\$transportConfig, and any \$serviceAddress",
r"$transportConfig, and any `$apiEndpoint`")
+# remove class_alias code
+s.replace(
+ "src/V*/**/*.php",
+ r"^// Adding a class alias for backwards compatibility with the previous class name.$"
+ + "\n"
+ + r"^class_alias\(.*\);$"
+ + "\n",
+ '')
+
### [START] protoc backwards compatibility fixes
# roll back to private properties.
diff --git a/Optimization/owlbot.py b/Optimization/owlbot.py
index 97230876f635..ee0c4af19566 100644
--- a/Optimization/owlbot.py
+++ b/Optimization/owlbot.py
@@ -30,7 +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 / "**/[A-Z]*_*.php"
+ ]
+)
# document and utilize apiEndpoint instead of serviceAddress
s.replace(
@@ -50,6 +56,15 @@
r"\$transportConfig, and any \$serviceAddress",
r"$transportConfig, and any `$apiEndpoint`")
+# remove class_alias code
+s.replace(
+ "src/V*/**/*.php",
+ r"^// Adding a class alias for backwards compatibility with the previous class name.$"
+ + "\n"
+ + r"^class_alias\(.*\);$"
+ + "\n",
+ '')
+
### [START] protoc backwards compatibility fixes
# roll back to private properties.
@@ -94,4 +109,4 @@
'--write',
'--parser=php',
'--single-quote',
- '--print-width=80'])
\ No newline at end of file
+ '--print-width=80'])
diff --git a/phpunit-php5.xml.dist b/phpunit-php5.xml.dist
index bea338c9d719..8961c7386da1 100644
--- a/phpunit-php5.xml.dist
+++ b/phpunit-php5.xml.dist
@@ -24,7 +24,7 @@
-
+
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 08b89c3d9ef7..f564c4d9890c 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -23,6 +23,6 @@
-
+