From 4c57e8475f78ccac80407f03c2d23d30014785f9 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Thu, 20 Apr 2017 01:19:03 -0700 Subject: Prepend "PB" to generated classes whose name are reserved words. (#2990) --- php/tests/proto/test.proto | 10 ++++++++++ php/tests/proto/test_prefix.proto | 5 +++++ 2 files changed, 15 insertions(+) (limited to 'php/tests/proto') diff --git a/php/tests/proto/test.proto b/php/tests/proto/test.proto index b6c14866..f0d009c8 100644 --- a/php/tests/proto/test.proto +++ b/php/tests/proto/test.proto @@ -108,6 +108,11 @@ message TestMessage { } NestedEnum optional_nested_enum = 101; + + // Test prefix for reserved words. + message Empty { + int32 a = 1; + } } enum TestEnum { @@ -116,6 +121,11 @@ enum TestEnum { TWO = 2; } +// Test prefix for reserved words. +message Empty { + int32 a = 1; +} + message TestPackedMessage { repeated int32 repeated_int32 = 90 [packed = true]; repeated int64 repeated_int64 = 91 [packed = true]; diff --git a/php/tests/proto/test_prefix.proto b/php/tests/proto/test_prefix.proto index 04582121..9bfbad7f 100644 --- a/php/tests/proto/test_prefix.proto +++ b/php/tests/proto/test_prefix.proto @@ -5,3 +5,8 @@ option php_class_prefix = "Prefix"; message TestPrefix { int32 a = 1; } + +// Test prefix for reserved words. +message Empty { + int32 a = 1; +} -- cgit v1.2.3