aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/tests/proto
diff options
context:
space:
mode:
authorGravatar Paul Yang <TeBoring@users.noreply.github.com>2017-03-17 11:08:06 -0700
committerGravatar GitHub <noreply@github.com>2017-03-17 11:08:06 -0700
commit6b27c1f981a9a93918e4039f236ead27165a8e91 (patch)
tree980c622c849bc84be49b70996ce4e19979ba9122 /php/tests/proto
parentc0871aa49c685e3aca19244c67d54ff321a62865 (diff)
Add file option php_class_prefix (#2849)
This option will be prepended to generated classes of all messages in the containing file.
Diffstat (limited to 'php/tests/proto')
-rw-r--r--php/tests/proto/test.proto5
-rw-r--r--php/tests/proto/test_prefix.proto7
2 files changed, 12 insertions, 0 deletions
diff --git a/php/tests/proto/test.proto b/php/tests/proto/test.proto
index e5dee0fb..1a47a3f2 100644
--- a/php/tests/proto/test.proto
+++ b/php/tests/proto/test.proto
@@ -1,6 +1,7 @@
syntax = "proto3";
import 'proto/test_include.proto';
+import 'proto/test_prefix.proto';
package foo;
@@ -142,3 +143,7 @@ message TestUnpackedMessage {
message TestPhpDoc {
int32 a = 1;
}
+
+message TestIncludePrefixMessage {
+ TestPrefix prefix_message = 1;
+}
diff --git a/php/tests/proto/test_prefix.proto b/php/tests/proto/test_prefix.proto
new file mode 100644
index 00000000..04582121
--- /dev/null
+++ b/php/tests/proto/test_prefix.proto
@@ -0,0 +1,7 @@
+syntax = "proto3";
+
+option php_class_prefix = "Prefix";
+
+message TestPrefix {
+ int32 a = 1;
+}