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

No need to generate addtional has method for proto2 #7802

Merged
merged 2 commits into from
Aug 12, 2020

Conversation

TeBoring
Copy link
Contributor

No description provided.

php/src/Google/Protobuf/Internal/DescriptorProto.php Outdated Show resolved Hide resolved
@@ -119,11 +129,6 @@ public function setName($var)
return $this;
}

public function hasName()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this is technical a backward incompatible change. However since the method appears to be useless (has_name is never true AFAICS?) this will hopefully not be disruptive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The situation is that has method has already been generated generally.
Generating has methods for descriptors is a duplicate.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think has methods are not generated for repeated fields, and should not be.

So this is backward incompatible, but hopefully rarely used. Anyone who was using it should check the repeated field size instead.

@TeBoring TeBoring merged commit 5ce6232 into protocolbuffers:3.13.x Aug 12, 2020
vesavlad pushed a commit to vesavlad/protobuf that referenced this pull request Sep 22, 2020
…7802)

* No need to generate addtional has method for proto2

* Also remove has property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants