* Fix NPE during encoding and add regression test for issue 9507.
(cherry picked from commit 58e320a732)
* Implement `respond_to?` in RubyMessage (#9677)
All synthetic methods implemented by `method_missing` are now supported by `respond_to?`.
Fixes issue #9202.
* Fix null pointer exceptions exposed by new regression tests.
* Fix clear_ on oneofs so that it is safe to call repeatedly and so that respond_to? does not depend on whether the oneof is currently cleared.
* Code cleanup: reenable more tests on JRuby.
* Align JRuby behavior with CRuby by throwing a RuntimeError when attempting to assign to a oneof.
(cherry picked from commit 8e7f936696)
* Update protobuf version
* Merge pull request #9727 from mlocati/build-packaged-php-extension
Fix building packaged PHP extension
(cherry picked from commit 7f9901c5f6)
* Update protobuf version
* Update changelogs for 3.20.1-rc1
Co-authored-by: Jason Lunn <jason.lunn@gmail.com>
Co-authored-by: Jorg Brown <jorg.brown@gmail.com>
This doesn't test *all* possibilities (e.g. the field being a
wrapper, or a message field, etc) - but I'm fairly confident that I
found all the places referring to the case.
* Fix comment syntax in any.proto
Remove extra spaces which cause incorrect indentation in godoc.
Remove the "====" style title which is not rendered by godoc.
* Run ./generate_descriptor_proto.sh
CreateCodedInput is created from the underlying array behind the ByteString.
If this was created from a larger array (via Memory<byte> or ArrayPool etc)
then the CodedInput refers to the wrong section of memory.
Change is to add the offset and count like the other methods that use the
ArraySegment (ToString, ToBase64, WriteTo).
* Add more testing for ReadOnlySpan parsing
* Update `AssertReadFromParseContext` to also run assertions for a
`ParseContext` initialized from a `ReadOnlySpan` of the given input.
* Remove passing `ReadOnlySpan` parameters by ref since they are not
altered and the type isn't large enough to benefit from performance
improvements for passing by `ref` or `in`
* Update `ParseContext` `Initialize` overloads for
`ReadOnlySpan<byte>`, going down to two (since nothing was calling the
overload that changed the recursion limit). The first now calls the
second to set the `buffer` and `state` on the context, and has
documentation to note that it is used to create a `ParserInternalState`
with default settings.