Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP files generator don't detect reserved class name Object #289

Closed
inkr-xx opened this issue Mar 29, 2022 · 2 comments
Closed

PHP files generator don't detect reserved class name Object #289

inkr-xx opened this issue Mar 29, 2022 · 2 comments

Comments

@inkr-xx
Copy link

inkr-xx commented Mar 29, 2022

Should be:
If the message class name is reserved (for example, Empty), the prefix PB is prepended to the class name
But class with name Object is still created.

syntax = "proto3";
package com.xxx.platform.iot.object;
option java_multiple_files = true;
message Object {
  optional string                     object_id = 1;
}

And result
class Object extends \Google\Protobuf\Internal\Message

google/protobuf version is not the latest. See:
protocolbuffers/protobuf#8962

@ido-namely
Copy link
Contributor

Hi @inkr-xx ,
We've released several new versions since opened this issue.
Would you mind checking if the issue was resolved?

@ido-namely
Copy link
Contributor

Hi @inkr-xx ,
I was able to reproduce the issue you reported even with our latest version.
However, we pull protobuf library from the grpc/grpc repo, which currently pins protobuf to 3.19.4 - https://github.com/grpc/grpc/tree/v1.47.0/third_party
So we will wait for that repo to pull a newer version of protobuf for it to apply in this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants