aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/src/Google/Protobuf/Internal/DescriptorPool.php
diff options
context:
space:
mode:
authorGravatar Paul Yang <TeBoring@users.noreply.github.com>2018-06-07 18:16:44 -0700
committerGravatar GitHub <noreply@github.com>2018-06-07 18:16:44 -0700
commitce044817c7ba0aea27c3fd8e496635d94d20a755 (patch)
treef786537d923df55129a340480199859251ef2259 /php/src/Google/Protobuf/Internal/DescriptorPool.php
parentd6353b489e16c5ff7dde4aa648f142a0d0b24ceb (diff)
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
Diffstat (limited to 'php/src/Google/Protobuf/Internal/DescriptorPool.php')
-rw-r--r--php/src/Google/Protobuf/Internal/DescriptorPool.php2
1 files changed, 2 insertions, 0 deletions
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)