Fix PhpDoc comments for message accessors to include "|null". (#8136)
Message accessors will return null when when the field is not
set, so this should be reflected in the PhpDoc.
Also updated the code generator for the well-known types to reflect
the edits made in https://github.com/protocolbuffers/protobuf/pull/8105.
Also explicitly check for upb_msg_has() in the oneof accessor, so
we are not implicitly relying on unset message fields returning NULL
at the upb level.
diff --git a/php/src/Google/Protobuf/Value.php b/php/src/Google/Protobuf/Value.php
index 20db3cc..7bebb99 100644
--- a/php/src/Google/Protobuf/Value.php
+++ b/php/src/Google/Protobuf/Value.php
@@ -174,7 +174,7 @@
* Represents a structured value.
*
* Generated from protobuf field <code>.google.protobuf.Struct struct_value = 5;</code>
- * @return \Google\Protobuf\Struct
+ * @return \Google\Protobuf\Struct|null
*/
public function getStructValue()
{
@@ -205,7 +205,7 @@
* Represents a repeated `Value`.
*
* Generated from protobuf field <code>.google.protobuf.ListValue list_value = 6;</code>
- * @return \Google\Protobuf\ListValue
+ * @return \Google\Protobuf\ListValue|null
*/
public function getListValue()
{