Jelajahi Sumber

Remove GPBWrapperUtil from generated code (#5880)

* Remove GPBWrapperUtil from generated code

* Add newline
Paul Yang 6 tahun lalu
induk
melakukan
207d01daa1
28 mengubah file dengan 2 tambahan dan 31 penghapusan
  1. 0 1
      php/src/Google/Protobuf/Internal/DescriptorProto.php
  2. 0 1
      php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
  3. 0 1
      php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
  4. 0 1
      php/src/Google/Protobuf/Internal/EnumDescriptorProto.php
  5. 0 1
      php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
  6. 0 1
      php/src/Google/Protobuf/Internal/EnumOptions.php
  7. 0 1
      php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
  8. 0 1
      php/src/Google/Protobuf/Internal/EnumValueOptions.php
  9. 0 1
      php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
  10. 0 1
      php/src/Google/Protobuf/Internal/FieldDescriptorProto.php
  11. 0 1
      php/src/Google/Protobuf/Internal/FieldOptions.php
  12. 0 1
      php/src/Google/Protobuf/Internal/FileDescriptorProto.php
  13. 0 1
      php/src/Google/Protobuf/Internal/FileDescriptorSet.php
  14. 0 1
      php/src/Google/Protobuf/Internal/FileOptions.php
  15. 0 1
      php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
  16. 0 1
      php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
  17. 0 1
      php/src/Google/Protobuf/Internal/MessageOptions.php
  18. 0 1
      php/src/Google/Protobuf/Internal/MethodDescriptorProto.php
  19. 0 1
      php/src/Google/Protobuf/Internal/MethodOptions.php
  20. 0 1
      php/src/Google/Protobuf/Internal/OneofDescriptorProto.php
  21. 0 1
      php/src/Google/Protobuf/Internal/OneofOptions.php
  22. 0 1
      php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
  23. 0 1
      php/src/Google/Protobuf/Internal/ServiceOptions.php
  24. 0 1
      php/src/Google/Protobuf/Internal/SourceCodeInfo.php
  25. 0 1
      php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
  26. 0 1
      php/src/Google/Protobuf/Internal/UninterpretedOption.php
  27. 0 1
      php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php
  28. 2 4
      src/google/protobuf/compiler/php/php_generator.cc

+ 0 - 1
php/src/Google/Protobuf/Internal/DescriptorProto.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Describes a message type.

+ 0 - 1
php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.DescriptorProto.ExtensionRange</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Range of reserved tag numbers. Reserved tag numbers may not be used by

+ 0 - 1
php/src/Google/Protobuf/Internal/EnumDescriptorProto.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Describes an enum type.

+ 0 - 1
php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Range of reserved numeric values. Reserved values may not be used by

+ 0 - 1
php/src/Google/Protobuf/Internal/EnumOptions.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.EnumOptions</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Describes a value within an enum.

+ 0 - 1
php/src/Google/Protobuf/Internal/EnumValueOptions.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.EnumValueOptions</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/FieldDescriptorProto.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Describes a field within a message.

+ 0 - 1
php/src/Google/Protobuf/Internal/FieldOptions.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.FieldOptions</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/FileDescriptorProto.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Describes a complete .proto file.

+ 0 - 1
php/src/Google/Protobuf/Internal/FileDescriptorSet.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * The protocol compiler can output a FileDescriptorSet containing the .proto

+ 0 - 1
php/src/Google/Protobuf/Internal/FileOptions.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.FileOptions</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Describes the relationship between generated code and its original source

+ 0 - 1
php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/MessageOptions.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.MessageOptions</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/MethodDescriptorProto.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Describes a method of a service.

+ 0 - 1
php/src/Google/Protobuf/Internal/MethodOptions.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.MethodOptions</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/OneofDescriptorProto.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Describes a oneof.

+ 0 - 1
php/src/Google/Protobuf/Internal/OneofOptions.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.OneofOptions</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Describes a service.

+ 0 - 1
php/src/Google/Protobuf/Internal/ServiceOptions.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.ServiceOptions</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/SourceCodeInfo.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Encapsulates information about the original source file from which a

+ 0 - 1
php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * Generated from protobuf message <code>google.protobuf.SourceCodeInfo.Location</code>

+ 0 - 1
php/src/Google/Protobuf/Internal/UninterpretedOption.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * A message representing a option the parser does not recognize. This only

+ 0 - 1
php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php

@@ -9,7 +9,6 @@ use Google\Protobuf\Internal\GPBWire;
 use Google\Protobuf\Internal\RepeatedField;
 use Google\Protobuf\Internal\InputStream;
 use Google\Protobuf\Internal\GPBUtil;
-use Google\Protobuf\Internal\GPBWrapperUtils;
 
 /**
  * The name of the uninterpreted option.  Each string represents a segment in

+ 2 - 4
src/google/protobuf/compiler/php/php_generator.cc

@@ -1023,16 +1023,14 @@ void GenerateUseDeclaration(bool is_descriptor, io::Printer* printer) {
     printer->Print(
         "use Google\\Protobuf\\Internal\\GPBType;\n"
         "use Google\\Protobuf\\Internal\\RepeatedField;\n"
-        "use Google\\Protobuf\\Internal\\GPBUtil;\n"
-        "use Google\\Protobuf\\Internal\\GPBWrapperUtils;\n\n");
+        "use Google\\Protobuf\\Internal\\GPBUtil;\n\n");
   } else {
     printer->Print(
         "use Google\\Protobuf\\Internal\\GPBType;\n"
         "use Google\\Protobuf\\Internal\\GPBWire;\n"
         "use Google\\Protobuf\\Internal\\RepeatedField;\n"
         "use Google\\Protobuf\\Internal\\InputStream;\n"
-        "use Google\\Protobuf\\Internal\\GPBUtil;\n"
-        "use Google\\Protobuf\\Internal\\GPBWrapperUtils;\n\n");
+        "use Google\\Protobuf\\Internal\\GPBUtil;\n\n");
   }
 }