Revert "Make php message class final to avoid mocking (#6277)" (#6324)

This reverts commit 7f84a94366.
This is just temporary. Eventually, we still want to roll forward this
change. Some users are complaining they need more time to clean up their
code.
pull/6351/head
Paul Yang 5 years ago committed by GitHub
parent 2c2267cf2f
commit 15929e1b16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. BIN
      csharp/src/Google.Protobuf.Test/testprotos.pb
  2. 2
      php/src/Google/Protobuf/Internal/DescriptorProto.php
  3. 2
      php/src/Google/Protobuf/Internal/DescriptorProto/ExtensionRange.php
  4. 2
      php/src/Google/Protobuf/Internal/DescriptorProto/ReservedRange.php
  5. 2
      php/src/Google/Protobuf/Internal/EnumDescriptorProto.php
  6. 2
      php/src/Google/Protobuf/Internal/EnumDescriptorProto/EnumReservedRange.php
  7. 2
      php/src/Google/Protobuf/Internal/EnumOptions.php
  8. 2
      php/src/Google/Protobuf/Internal/EnumValueDescriptorProto.php
  9. 2
      php/src/Google/Protobuf/Internal/EnumValueOptions.php
  10. 2
      php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
  11. 2
      php/src/Google/Protobuf/Internal/FieldDescriptorProto.php
  12. 2
      php/src/Google/Protobuf/Internal/FieldOptions.php
  13. 2
      php/src/Google/Protobuf/Internal/FileDescriptorProto.php
  14. 2
      php/src/Google/Protobuf/Internal/FileDescriptorSet.php
  15. 2
      php/src/Google/Protobuf/Internal/FileOptions.php
  16. 2
      php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
  17. 2
      php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
  18. 2
      php/src/Google/Protobuf/Internal/MessageOptions.php
  19. 2
      php/src/Google/Protobuf/Internal/MethodDescriptorProto.php
  20. 2
      php/src/Google/Protobuf/Internal/MethodOptions.php
  21. 2
      php/src/Google/Protobuf/Internal/OneofDescriptorProto.php
  22. 2
      php/src/Google/Protobuf/Internal/OneofOptions.php
  23. 2
      php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
  24. 2
      php/src/Google/Protobuf/Internal/ServiceOptions.php
  25. 2
      php/src/Google/Protobuf/Internal/SourceCodeInfo.php
  26. 2
      php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
  27. 2
      php/src/Google/Protobuf/Internal/UninterpretedOption.php
  28. 2
      php/src/Google/Protobuf/Internal/UninterpretedOption/NamePart.php
  29. 2
      src/google/protobuf/compiler/php/php_generator.cc

@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.DescriptorProto</code>
*/
final class DescriptorProto extends \Google\Protobuf\Internal\Message
class DescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.DescriptorProto.ExtensionRange</code>
*/
final class ExtensionRange extends \Google\Protobuf\Internal\Message
class ExtensionRange extends \Google\Protobuf\Internal\Message
{
/**
* Inclusive.

@ -17,7 +17,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.DescriptorProto.ReservedRange</code>
*/
final class ReservedRange extends \Google\Protobuf\Internal\Message
class ReservedRange extends \Google\Protobuf\Internal\Message
{
/**
* Inclusive.

@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.EnumDescriptorProto</code>
*/
final class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>

@ -19,7 +19,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.EnumDescriptorProto.EnumReservedRange</code>
*/
final class EnumReservedRange extends \Google\Protobuf\Internal\Message
class EnumReservedRange extends \Google\Protobuf\Internal\Message
{
/**
* Inclusive.

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.EnumOptions</code>
*/
final class EnumOptions extends \Google\Protobuf\Internal\Message
class EnumOptions extends \Google\Protobuf\Internal\Message
{
/**
* Set this option to true to allow mapping different tag names to the same

@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.EnumValueDescriptorProto</code>
*/
final class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
class EnumValueDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.EnumValueOptions</code>
*/
final class EnumValueOptions extends \Google\Protobuf\Internal\Message
class EnumValueOptions extends \Google\Protobuf\Internal\Message
{
/**
* Is this enum value deprecated?

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions</code>
*/
final class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
{
/**
* The parser stores options it doesn't recognize here. See above.

@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.FieldDescriptorProto</code>
*/
final class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
class FieldDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.FieldOptions</code>
*/
final class FieldOptions extends \Google\Protobuf\Internal\Message
class FieldOptions extends \Google\Protobuf\Internal\Message
{
/**
* The ctype option instructs the C++ code generator to use a different

@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.FileDescriptorProto</code>
*/
final class FileDescriptorProto extends \Google\Protobuf\Internal\Message
class FileDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* file name, relative to root of source tree

@ -16,7 +16,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.FileDescriptorSet</code>
*/
final class FileDescriptorSet extends \Google\Protobuf\Internal\Message
class FileDescriptorSet extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>repeated .google.protobuf.FileDescriptorProto file = 1;</code>

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.FileOptions</code>
*/
final class FileOptions extends \Google\Protobuf\Internal\Message
class FileOptions extends \Google\Protobuf\Internal\Message
{
/**
* Sets the Java package where classes generated from this .proto will be

@ -17,7 +17,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo</code>
*/
final class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
{
/**
* An Annotation connects some span of text in generated code to an element

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code>
*/
final class Annotation extends \Google\Protobuf\Internal\Message
class Annotation extends \Google\Protobuf\Internal\Message
{
/**
* Identifies the element in the original source .proto file. This field

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.MessageOptions</code>
*/
final class MessageOptions extends \Google\Protobuf\Internal\Message
class MessageOptions extends \Google\Protobuf\Internal\Message
{
/**
* Set true to use the old proto1 MessageSet wire format for extensions.

@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.MethodDescriptorProto</code>
*/
final class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.MethodOptions</code>
*/
final class MethodOptions extends \Google\Protobuf\Internal\Message
class MethodOptions extends \Google\Protobuf\Internal\Message
{
/**
* Is this method deprecated?

@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.OneofDescriptorProto</code>
*/
final class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.OneofOptions</code>
*/
final class OneofOptions extends \Google\Protobuf\Internal\Message
class OneofOptions extends \Google\Protobuf\Internal\Message
{
/**
* The parser stores options it doesn't recognize here. See above.

@ -15,7 +15,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.ServiceDescriptorProto</code>
*/
final class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.ServiceOptions</code>
*/
final class ServiceOptions extends \Google\Protobuf\Internal\Message
class ServiceOptions extends \Google\Protobuf\Internal\Message
{
/**
* Is this service deprecated?

@ -16,7 +16,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.SourceCodeInfo</code>
*/
final class SourceCodeInfo extends \Google\Protobuf\Internal\Message
class SourceCodeInfo extends \Google\Protobuf\Internal\Message
{
/**
* A Location identifies a piece of source code in a .proto file which

@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.SourceCodeInfo.Location</code>
*/
final class Location extends \Google\Protobuf\Internal\Message
class Location extends \Google\Protobuf\Internal\Message
{
/**
* Identifies which part of the FileDescriptorProto was defined at this

@ -20,7 +20,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.UninterpretedOption</code>
*/
final class UninterpretedOption extends \Google\Protobuf\Internal\Message
class UninterpretedOption extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>

@ -19,7 +19,7 @@ use Google\Protobuf\Internal\GPBUtil;
*
* Generated from protobuf message <code>google.protobuf.UninterpretedOption.NamePart</code>
*/
final class NamePart extends \Google\Protobuf\Internal\Message
class NamePart extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>required string name_part = 1;</code>

@ -1265,7 +1265,7 @@ void GenerateMessageFile(const FileDescriptor* file, const Descriptor* message,
}
printer.Print(
"final class ^name^ extends \\Google\\Protobuf\\Internal\\Message\n"
"class ^name^ extends \\Google\\Protobuf\\Internal\\Message\n"
"{\n",
"name", fullname);
Indent(&printer);

Loading…
Cancel
Save