* Make php message class final
Because proto messages are just data object, they should not be mocked.
Explicitly make them final to avoid accidental usage.
* Update generated descriptors
* php: Fixed php notices for unknown enum indices
* php: Fixed formatting of Duration
This fixes:
* Missing nanoseconds. The nanoseconds where divided as a float and
implicitly converted to a string before being passed to bcadd.
This can result in a float formatted in scientific/exponential notation,
which bcmath doesn't understand.
* Durations are supposed to be formatted without trailing zeroes.
We found that some code depended on the behavior of appending to the
string without clearing it first. The comments in json_util.h also make
it appear that the appending behavior is intentional, so I think we need
to stick with the old behavior.
This reverts commit 3cbe45a4b5.
value_field_typeclass should be a enum module, not EnumDescriptor
object.
Also expanding tests for enum valued maps.
Fixes#4580
Signed-off-by: Sorah Fukumori <her@sorah.jp>
Make the JSON util string output functions match the Message::SerializeToString() behavior. This is helpful when packing the output into string fields of reused protobuf messages.
This avoids hitting the following warning when including GPBDescriptor.h in ARC
projects with stricter warning settings:
error: 'assign' property of object type may become a dangling reference; consider using 'unsafe_unretained' [-Werror,-Wobjc-property-assign-on-object-type
We first hit this in XCode 11, it's unclear whether it simply got stricter about
enforcing this warning or whether the flags enabled with -Wall or -Weverything
have been expanded.
In some platforms ${CMAKE_INSTALL_LIBDIR} expands to `lib64`. The libraries
are correctly installed in that directory, but the RPATH is set to point to
`$ORIGIN/../lib`, where it should be `$ORIGIN/../lib64`.