aboutsummaryrefslogtreecommitdiffhomepage
path: root/conformance/conformance_php.php
diff options
context:
space:
mode:
Diffstat (limited to 'conformance/conformance_php.php')
-rwxr-xr-xconformance/conformance_php.php31
1 files changed, 6 insertions, 25 deletions
diff --git a/conformance/conformance_php.php b/conformance/conformance_php.php
index 4dc18f59..19f9a092 100755
--- a/conformance/conformance_php.php
+++ b/conformance/conformance_php.php
@@ -3,24 +3,6 @@
require_once("Conformance/WireFormat.php");
require_once("Conformance/ConformanceResponse.php");
require_once("Conformance/ConformanceRequest.php");
-require_once("Google/Protobuf/Any.php");
-require_once("Google/Protobuf/Duration.php");
-require_once("Google/Protobuf/FieldMask.php");
-require_once("Google/Protobuf/Struct.php");
-require_once("Google/Protobuf/Value.php");
-require_once("Google/Protobuf/ListValue.php");
-require_once("Google/Protobuf/NullValue.php");
-require_once("Google/Protobuf/Timestamp.php");
-require_once("Google/Protobuf/DoubleValue.php");
-require_once("Google/Protobuf/BytesValue.php");
-require_once("Google/Protobuf/FloatValue.php");
-require_once("Google/Protobuf/Int64Value.php");
-require_once("Google/Protobuf/UInt32Value.php");
-require_once("Google/Protobuf/BoolValue.php");
-require_once("Google/Protobuf/DoubleValue.php");
-require_once("Google/Protobuf/Int32Value.php");
-require_once("Google/Protobuf/StringValue.php");
-require_once("Google/Protobuf/UInt64Value.php");
require_once("Protobuf_test_messages/Proto3/ForeignMessage.php");
require_once("Protobuf_test_messages/Proto3/ForeignEnum.php");
require_once("Protobuf_test_messages/Proto3/TestAllTypesProto3.php");
@@ -28,12 +10,6 @@ require_once("Protobuf_test_messages/Proto3/TestAllTypesProto3_NestedMessage.php
require_once("Protobuf_test_messages/Proto3/TestAllTypesProto3_NestedEnum.php");
require_once("GPBMetadata/Conformance.php");
-require_once("GPBMetadata/Google/Protobuf/Any.php");
-require_once("GPBMetadata/Google/Protobuf/Duration.php");
-require_once("GPBMetadata/Google/Protobuf/FieldMask.php");
-require_once("GPBMetadata/Google/Protobuf/Struct.php");
-require_once("GPBMetadata/Google/Protobuf/Timestamp.php");
-require_once("GPBMetadata/Google/Protobuf/Wrappers.php");
require_once("GPBMetadata/Google/Protobuf/TestMessagesProto3.php");
use \Conformance\WireFormat;
@@ -78,7 +54,12 @@ function doTest($request)
} elseif ($request->getRequestedOutputFormat() == WireFormat::PROTOBUF) {
$response->setProtobufPayload($test_message->serializeToString());
} elseif ($request->getRequestedOutputFormat() == WireFormat::JSON) {
- $response->setJsonPayload($test_message->serializeToJsonString());
+ try {
+ $response->setJsonPayload($test_message->serializeToJsonString());
+ } catch (Exception $e) {
+ $response->setSerializeError($e->getMessage());
+ return $response;
+ }
}
return $response;