From ce044817c7ba0aea27c3fd8e496635d94d20a755 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Thu, 7 Jun 2018 18:16:44 -0700 Subject: Use legacy name in php runtime (#4741) * Use legacy name in php runtime Old generated code cannot work with new runtime, because the new runtime assumes new class name for nested message. For details see #4738. * Remove unused method --- php/src/Google/Protobuf/Internal/DescriptorPool.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'php/src/Google/Protobuf/Internal/DescriptorPool.php') diff --git a/php/src/Google/Protobuf/Internal/DescriptorPool.php b/php/src/Google/Protobuf/Internal/DescriptorPool.php index 304c1615..9b4dcc01 100644 --- a/php/src/Google/Protobuf/Internal/DescriptorPool.php +++ b/php/src/Google/Protobuf/Internal/DescriptorPool.php @@ -92,6 +92,7 @@ class DescriptorPool $this->proto_to_class[$descriptor->getFullName()] = $descriptor->getClass(); $this->class_to_desc[$descriptor->getClass()] = $descriptor; + $this->class_to_desc[$descriptor->getLegacyClass()] = $descriptor; foreach ($descriptor->getNestedType() as $nested_type) { $this->addDescriptor($nested_type); } @@ -105,6 +106,7 @@ class DescriptorPool $this->proto_to_class[$descriptor->getFullName()] = $descriptor->getClass(); $this->class_to_enum_desc[$descriptor->getClass()] = $descriptor; + $this->class_to_enum_desc[$descriptor->getLegacyClass()] = $descriptor; } public function getDescriptorByClassName($klass) -- cgit v1.2.3