Previously, within the same load period of protobuf module, well known
types are not initialized correctly for the second request. The reason
is that well known type are only initialized if a method local static
variable is not set. However, that variable is not reset after request
ends. Therefore, when the second request comes, the method local static
variable is still set (by previous request) and well types are not
initialized in this case.
This changes the linking error if php extension is not statically linked
to a runtime error. In this way, users who don't need Timestamp can
still use protobuf even if date extension is not statically linked in
php.
* Recursively clear unknown fields in submessages.
* Recursively discard unknown fields in submsg for c extension
* Fix zts build
* Add comment for tests
* Add a TODO to add a util for encoding varint for better readability.
* Add test for oneof message field.
* Fix php well known type conformance tests
* Properly generate code for test.proto
* Provide GPBMetadata files in c extensions for generated files to import.
* Remove unnecessary test
* Clean up code
* Add declaration for initOnce.
* Refactoring
* Fix php well known type conformance tests
* Properly generate code for test.proto
* Provide GPBMetadata files in c extensions for generated files to import.
* Remove unnecessary test
* Clean up code
* Add declaration for initOnce.
* Refactoring
* Reserve unknown fields in upb
1) For decoding, an unknownfields will be lazily created on message,
which contains bytes of unknown fields.
2) For encoding, if the unknownfields is present on message, all bytes
contained in it will be serialized.
* Register the function to encode unknown field at decode time.
* Remove upb_handlers_setaddunknown
* Use upb_sink_putunknown in decoder
* Remove upb_pb_encoder_encode_unknown
* Do not expose encode_unknown
* Implement reserve unknown field in php Implement.
* Make buffer private to CodedInputStream
* Add well known types to php runtime.
* Fix php7.0 tests
* No longer generate empty.proto in test as it has been included in
runtime.
* Fix zts build
* Clean code
* Rename g_p_b_empty to empty.
* Don't generate code for empty.proto in compatibility test
* Fix 32-bit
* Fix mac build
* Fix Makefile.am to add new files