diff --git a/.bazelignore b/.bazelignore index 5c3a81cce9..b92bad0bf4 100644 --- a/.bazelignore +++ b/.bazelignore @@ -1,4 +1,5 @@ # These are fetched as external repositories. +third_party/abseil-cpp third_party/benchmark third_party/googletest _build/ diff --git a/.gitmodules b/.gitmodules index bcd125a495..a287f070e8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,7 @@ path = third_party/googletest url = https://github.com/google/googletest.git ignore = dirty +[submodule "third_party/abseil-cpp"] + path = third_party/abseil-cpp + url = https://github.com/abseil/abseil-cpp.git + branch = lts_2021_11_02 diff --git a/BUILD b/BUILD index 5de4aa3f2f..e437626514 100644 --- a/BUILD +++ b/BUILD @@ -2,13 +2,12 @@ load("@bazel_skylib//rules:common_settings.bzl", "string_flag") load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test", "objc_library", native_cc_proto_library = "cc_proto_library") -load("@rules_pkg//:pkg.bzl", "pkg_zip") -load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_files") load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain", "proto_library") load("@rules_python//python:defs.bzl", "py_library") load("@rules_java//java:defs.bzl", "java_binary", "java_lite_proto_library", "java_proto_library") load(":cc_proto_blacklist_test.bzl", "cc_proto_blacklist_test") load(":protobuf_release.bzl", "package_naming") + licenses(["notice"]) exports_files(["LICENSE"]) @@ -353,6 +352,11 @@ filegroup( visibility = ["//visibility:public"], ) +exports_files( + srcs = WELL_KNOWN_PROTOS, + visibility = ["//pkg:__pkg__"], +) + filegroup( name = "lite_well_known_protos", srcs = LITE_WELL_KNOWN_PROTOS, @@ -519,70 +523,6 @@ cc_binary( deps = [":protoc_lib"], ) - -################################################################################ -# Generates protoc release artifacts. -################################################################################ - -genrule( - name = "protoc_readme", - visibility = ["//visibility:private"], - cmd = """ -echo "Protocol Buffers - Google's data interchange format -Copyright 2008 Google Inc. -https://developers.google.com/protocol-buffers/ -This package contains a precompiled binary version of the protocol buffer -compiler (protoc). This binary is intended for users who want to use Protocol -Buffers in languages other than C++ but do not want to compile protoc -themselves. To install, simply place this binary somewhere in your PATH. -If you intend to use the included well known types then don't forget to -copy the contents of the 'include' directory somewhere as well, for example -into '/usr/local/include/'. -Please refer to our official github site for more installation instructions: - https://github.com/protocolbuffers/protobuf" > $@ - """, - outs = ["readme.txt"], -) - -# plugin.proto is excluded from this list because it belongs in a nested folder (protobuf/compiler/plugin.proto) -pkg_files( - name = "wkt_protos_files", - srcs = [value[0] for value in WELL_KNOWN_PROTO_MAP.values() if not value[0].endswith("plugin.proto")], - visibility = ["//visibility:private"], - prefix = "include/google/protobuf", -) - -pkg_files( - name = "compiler_plugin_protos_files", - srcs = ["src/google/protobuf/compiler/plugin.proto"], - visibility = ["//visibility:private"], - prefix = "include/google/protobuf/compiler", -) - -pkg_files( - name = "protoc_files", - srcs = [":protoc"], - attributes = pkg_attributes(mode = "0555"), - visibility = ["//visibility:private"], - prefix = "bin/", -) - -package_naming( - name = "protoc_pkg_naming", -) - -pkg_zip( - name = "protoc_release", - package_file_name = "protoc-{version}-{platform}.zip", - package_variables = ":protoc_pkg_naming", - srcs = [ - ":protoc_files", - ":wkt_protos_files", - ":compiler_plugin_protos_files", - "readme.txt", - ], -) - ################################################################################ # Tests ################################################################################ @@ -905,10 +845,10 @@ internal_gen_kt_protos( internal_gen_kt_protos( name = "gen_well_known_protos_kotlinlite", + lite = True, visibility = [ "//java:__subpackages__", ], - lite = True, deps = [proto + "_proto" for proto in LITE_WELL_KNOWN_PROTO_MAP.keys()], ) @@ -1340,17 +1280,16 @@ cc_binary( # ], # ) - java_proto_library( name = "java_test_protos", - deps = [":generic_test_protos"], visibility = ["//java:__subpackages__"], + deps = [":generic_test_protos"], ) java_lite_proto_library( name = "java_lite_test_protos", - deps = [":generic_test_protos"], visibility = ["//java:__subpackages__"], + deps = [":generic_test_protos"], ) java_proto_library( @@ -1452,57 +1391,57 @@ filegroup( proto_library( name = "kt_unittest_lite", srcs = [ - "src/google/protobuf/unittest_lite.proto", + "src/google/protobuf/map_lite_unittest.proto", "src/google/protobuf/unittest_import_lite.proto", "src/google/protobuf/unittest_import_public_lite.proto", - "src/google/protobuf/map_lite_unittest.proto", + "src/google/protobuf/unittest_lite.proto", ], strip_import_prefix = "src", ) internal_gen_kt_protos( name = "gen_kotlin_unittest_lite", - deps = [":kt_unittest_lite"], lite = True, visibility = ["//java:__subpackages__"], + deps = [":kt_unittest_lite"], ) proto_library( name = "kt_unittest", srcs = [ + "src/google/protobuf/map_proto2_unittest.proto", "src/google/protobuf/unittest.proto", "src/google/protobuf/unittest_import.proto", "src/google/protobuf/unittest_import_public.proto", - "src/google/protobuf/map_proto2_unittest.proto", ], strip_import_prefix = "src", ) internal_gen_kt_protos( name = "gen_kotlin_unittest", - deps = [":kt_unittest"], visibility = ["//java:__subpackages__"], + deps = [":kt_unittest"], ) proto_library( name = "kt_proto3_unittest", srcs = [ - "src/google/protobuf/unittest_proto3.proto", "src/google/protobuf/unittest_import.proto", "src/google/protobuf/unittest_import_public.proto", + "src/google/protobuf/unittest_proto3.proto", ], strip_import_prefix = "src", ) internal_gen_kt_protos( name = "gen_kotlin_proto3_unittest_lite", - deps = [":kt_proto3_unittest"], lite = True, visibility = ["//java:__subpackages__"], + deps = [":kt_proto3_unittest"], ) internal_gen_kt_protos( name = "gen_kotlin_proto3_unittest", - deps = [":kt_proto3_unittest"], visibility = ["//java:__subpackages__"], + deps = [":kt_proto3_unittest"], ) diff --git a/CHANGES.txt b/CHANGES.txt index 03d441f1bf..0c0f63bee5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,10 @@ C++ * Optimize tokenizer ParseInteger by removing division * Reserve exactly the right amount of capacity in ExtensionSet::MergeFrom +Compiler + * Protoc outputs the list of suggested field numbers when invalid field + numbers are specified in the .proto file. + Java * 6x speedup in ArrayEncoder.writeUInt32NotTag diff --git a/benchmarks/README.md b/benchmarks/README.md index 19a26e1f32..70c359660b 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -5,7 +5,7 @@ This directory contains benchmarking schemas and data sets that you can use to test a variety of performance scenarios against your protobuf language runtime. If you are looking for performance numbers of officially supported languages, see [Protobuf Performance]( -https://github.com/protocolbuffers/protobuf/blob/master/docs/performance.md). +https://github.com/protocolbuffers/protobuf/blob/main/docs/performance.md). ## Prerequisite @@ -61,7 +61,7 @@ PHP benchmark's requirement is the same as PHP protobuf's requirements. The benc include PHP protobuf's src and build the c extension if required. ### Node.js -Node.js benchmark need [node](https://nodejs.org/en/)(higher than V6) and [npm](https://www.npmjs.com/) package manager installed. This benchmark is using the [benchmark](https://www.npmjs.com/package/benchmark) framework to test, which needn't to manually install. And another prerequisite is [protobuf js](https://github.com/protocolbuffers/protobuf/tree/master/js), which needn't to manually install either +Node.js benchmark need [node](https://nodejs.org/en/)(higher than V6) and [npm](https://www.npmjs.com/) package manager installed. This benchmark is using the [benchmark](https://www.npmjs.com/package/benchmark) framework to test, which needn't to manually install. And another prerequisite is [protobuf js](https://github.com/protocolbuffers/protobuf/tree/main/js), which needn't to manually install either ### C# The C# benchmark code is built as part of the main Google.Protobuf diff --git a/cmake/README.md b/cmake/README.md index 3fee4a0414..ce3e680234 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -59,7 +59,7 @@ Or you can use git to clone from protobuf git repository. C:\Path\to> mkdir src & cd src C:\Path\to\src> git clone -b [release_tag] https://github.com/protocolbuffers/protobuf.git -Where *[release_tag]* is a git tag like *v3.0.0-beta-1* or a branch name like *master* +Where *[release_tag]* is a git tag like *v3.0.0-beta-1* or a branch name like *main* if you want to get the latest code. Go to the project folder: diff --git a/conformance/README.md b/conformance/README.md index 06925dbb55..063766060c 100644 --- a/conformance/README.md +++ b/conformance/README.md @@ -57,10 +57,10 @@ Testing other Protocol Buffer implementations To run these tests against a new Protocol Buffers implementation, write a program in your language that uses the protobuf implementation you want to test. This program should implement the testing protocol defined in -[conformance.proto](https://github.com/protocolbuffers/protobuf/blob/master/conformance/conformance.proto). +[conformance.proto](https://github.com/protocolbuffers/protobuf/blob/main/conformance/conformance.proto). This is designed to be as easy as possible: the C++ version is only 150 lines and is a good example for what this program should look like -(see [conformance_cpp.cc](https://github.com/protocolbuffers/protobuf/blob/master/conformance/conformance_cpp.cc)). +(see [conformance_cpp.cc](https://github.com/protocolbuffers/protobuf/blob/main/conformance/conformance_cpp.cc)). The program only needs to be able to read from stdin and write to stdout. Portability diff --git a/docs/options.md b/docs/options.md index 9b3fb8ec39..b489288415 100644 --- a/docs/options.md +++ b/docs/options.md @@ -315,4 +315,8 @@ with info about your project (name and website) so we can add an entry for you. 1. Protoc-gen-go-micro * Website: https://github.com/unistack-org/protoc-gen-go-micro - * Extension: 1144 \ No newline at end of file + * Extension: 1144 + +1. Protoc-gen-authz + * Website: https://github.com/Neakxs/protoc-gen-authz + * Extension: 1145 diff --git a/java/core/src/main/java/com/google/protobuf/DescriptorMessageInfoFactory.java b/java/core/src/main/java/com/google/protobuf/DescriptorMessageInfoFactory.java index 6090985e18..b856952c73 100644 --- a/java/core/src/main/java/com/google/protobuf/DescriptorMessageInfoFactory.java +++ b/java/core/src/main/java/com/google/protobuf/DescriptorMessageInfoFactory.java @@ -150,7 +150,7 @@ final class DescriptorMessageInfoFactory implements MessageInfoFactory { *
This class is thread-safe. */ //
The code is adapted from the C++ implementation:
- // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/compiler/java/java_helpers.h
+ // https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/compiler/java/java_helpers.h
static class IsInitializedCheckAnalyzer {
private final Maprepeated .google.protobuf.Method methods = 2;
- * @param \Google\Protobuf\Method[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Method>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMethods($var)
@@ -197,7 +197,7 @@ class Api extends \Google\Protobuf\Internal\Message
* Any metadata attached to the interface.
*
* Generated from protobuf field repeated .google.protobuf.Option options = 3;
- * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
@@ -319,7 +319,7 @@ class Api extends \Google\Protobuf\Internal\Message
* Included interfaces. See [Mixin][].
*
* Generated from protobuf field repeated .google.protobuf.Mixin mixins = 6;
- * @param \Google\Protobuf\Mixin[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Mixin>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMixins($var)
diff --git a/php/src/Google/Protobuf/Enum.php b/php/src/Google/Protobuf/Enum.php
index e803e930d8..185e54e03c 100644
--- a/php/src/Google/Protobuf/Enum.php
+++ b/php/src/Google/Protobuf/Enum.php
@@ -54,9 +54,9 @@ class Enum extends \Google\Protobuf\Internal\Message
*
* @type string $name
* Enum type name.
- * @type \Google\Protobuf\EnumValue[]|\Google\Protobuf\Internal\RepeatedField $enumvalue
+ * @type array<\Google\Protobuf\EnumValue>|\Google\Protobuf\Internal\RepeatedField $enumvalue
* Enum value definitions.
- * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* Protocol buffer options.
* @type \Google\Protobuf\SourceContext $source_context
* The source context.
@@ -110,7 +110,7 @@ class Enum extends \Google\Protobuf\Internal\Message
* Enum value definitions.
*
* Generated from protobuf field repeated .google.protobuf.EnumValue enumvalue = 2;
- * @param \Google\Protobuf\EnumValue[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\EnumValue>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setEnumvalue($var)
@@ -136,7 +136,7 @@ class Enum extends \Google\Protobuf\Internal\Message
* Protocol buffer options.
*
* Generated from protobuf field repeated .google.protobuf.Option options = 3;
- * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
diff --git a/php/src/Google/Protobuf/EnumValue.php b/php/src/Google/Protobuf/EnumValue.php
index 905f4ad14b..93c20f967c 100644
--- a/php/src/Google/Protobuf/EnumValue.php
+++ b/php/src/Google/Protobuf/EnumValue.php
@@ -44,7 +44,7 @@ class EnumValue extends \Google\Protobuf\Internal\Message
* Enum value name.
* @type int $number
* Enum value number.
- * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* Protocol buffer options.
* }
*/
@@ -120,7 +120,7 @@ class EnumValue extends \Google\Protobuf\Internal\Message
* Protocol buffer options.
*
* Generated from protobuf field repeated .google.protobuf.Option options = 3;
- * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
diff --git a/php/src/Google/Protobuf/Field.php b/php/src/Google/Protobuf/Field.php
index 76a505ea56..ddae570c2b 100644
--- a/php/src/Google/Protobuf/Field.php
+++ b/php/src/Google/Protobuf/Field.php
@@ -100,7 +100,7 @@ class Field extends \Google\Protobuf\Internal\Message
* types. The first type has index 1; zero means the type is not in the list.
* @type bool $packed
* Whether to use alternative packed wire representation.
- * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* The protocol buffer options.
* @type string $json_name
* The field JSON name.
@@ -314,7 +314,7 @@ class Field extends \Google\Protobuf\Internal\Message
* The protocol buffer options.
*
* Generated from protobuf field repeated .google.protobuf.Option options = 9;
- * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
diff --git a/php/src/Google/Protobuf/FieldMask.php b/php/src/Google/Protobuf/FieldMask.php
index 0b9659d38f..a8e5243f83 100644
--- a/php/src/Google/Protobuf/FieldMask.php
+++ b/php/src/Google/Protobuf/FieldMask.php
@@ -178,7 +178,7 @@ class FieldMask extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
- * @type string[]|\Google\Protobuf\Internal\RepeatedField $paths
+ * @type arrayrepeated string paths = 1;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated .google.protobuf.FieldDescriptorProto field = 2;
- * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setField($var)
@@ -151,7 +151,7 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 6;
- * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setExtension($var)
@@ -173,7 +173,7 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.DescriptorProto nested_type = 3;
- * @param \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setNestedType($var)
@@ -195,7 +195,7 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
- * @param \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setEnumType($var)
@@ -217,7 +217,7 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
- * @param \Google\Protobuf\Internal\DescriptorProto\ExtensionRange[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\DescriptorProto\ExtensionRange>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setExtensionRange($var)
@@ -239,7 +239,7 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;
- * @param \Google\Protobuf\Internal\OneofDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\OneofDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOneofDecl($var)
@@ -293,7 +293,7 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
- * @param \Google\Protobuf\Internal\DescriptorProto\ReservedRange[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\DescriptorProto\ReservedRange>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setReservedRange($var)
@@ -321,7 +321,7 @@ class DescriptorProto extends \Google\Protobuf\Internal\Message
* A given name may only be reserved once.
*
* Generated from protobuf field repeated string reserved_name = 10;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated .google.protobuf.EnumValueDescriptorProto value = 2;
- * @param \Google\Protobuf\Internal\EnumValueDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\EnumValueDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setValue($var)
@@ -173,7 +173,7 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
* overlap.
*
* Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
- * @param \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setReservedRange($var)
@@ -201,7 +201,7 @@ class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
* be reserved once.
*
* Generated from protobuf field repeated string reserved_name = 5;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
diff --git a/php/src/Google/Protobuf/Internal/EnumValueOptions.php b/php/src/Google/Protobuf/Internal/EnumValueOptions.php
index 84ba7bc85b..2db7fceea6 100644
--- a/php/src/Google/Protobuf/Internal/EnumValueOptions.php
+++ b/php/src/Google/Protobuf/Internal/EnumValueOptions.php
@@ -42,7 +42,7 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message
* Depending on the target platform, this can emit Deprecated annotations
* for the enum value, or it will be completely ignored; in the very least,
* this is a formalization for deprecating enum values.
- * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
*/
@@ -108,7 +108,7 @@ class EnumValueOptions extends \Google\Protobuf\Internal\Message
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
diff --git a/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php b/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
index b5e27c3e27..245173c3d0 100644
--- a/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
+++ b/php/src/Google/Protobuf/Internal/ExtensionRangeOptions.php
@@ -28,7 +28,7 @@ class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
- * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
*/
@@ -52,7 +52,7 @@ class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
diff --git a/php/src/Google/Protobuf/Internal/FieldOptions.php b/php/src/Google/Protobuf/Internal/FieldOptions.php
index 5fe7a19d1f..665cb065a8 100644
--- a/php/src/Google/Protobuf/Internal/FieldOptions.php
+++ b/php/src/Google/Protobuf/Internal/FieldOptions.php
@@ -180,7 +180,7 @@ class FieldOptions extends \Google\Protobuf\Internal\Message
* is a formalization for deprecating fields.
* @type bool $weak
* For Google-internal migration only. Do not use.
- * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
*/
@@ -552,7 +552,7 @@ class FieldOptions extends \Google\Protobuf\Internal\Message
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorProto.php b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php
index 435bd5fb6f..5ba7db6fbd 100644
--- a/php/src/Google/Protobuf/Internal/FileDescriptorProto.php
+++ b/php/src/Google/Protobuf/Internal/FileDescriptorProto.php
@@ -97,18 +97,18 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
* file name, relative to root of source tree
* @type string $package
* e.g. "foo", "foo.bar", etc.
- * @type string[]|\Google\Protobuf\Internal\RepeatedField $dependency
+ * @type arrayrepeated string dependency = 3;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated int32 public_dependency = 10;
- * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated int32 weak_dependency = 11;
- * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated .google.protobuf.DescriptorProto message_type = 4;
- * @param \Google\Protobuf\Internal\DescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMessageType($var)
@@ -314,7 +314,7 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
- * @param \Google\Protobuf\Internal\EnumDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setEnumType($var)
@@ -336,7 +336,7 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.ServiceDescriptorProto service = 6;
- * @param \Google\Protobuf\Internal\ServiceDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\ServiceDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setService($var)
@@ -358,7 +358,7 @@ class FileDescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.FieldDescriptorProto extension = 7;
- * @param \Google\Protobuf\Internal\FieldDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setExtension($var)
diff --git a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php
index 794e6347a3..1dae6fb3e3 100644
--- a/php/src/Google/Protobuf/Internal/FileDescriptorSet.php
+++ b/php/src/Google/Protobuf/Internal/FileDescriptorSet.php
@@ -29,7 +29,7 @@ class FileDescriptorSet extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
- * @type \Google\Protobuf\Internal\FileDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $file
+ * @type array<\Google\Protobuf\Internal\FileDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $file
* }
*/
public function __construct($data = NULL) {
@@ -48,7 +48,7 @@ class FileDescriptorSet extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.FileDescriptorProto file = 1;
- * @param \Google\Protobuf\Internal\FileDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\FileDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setFile($var)
diff --git a/php/src/Google/Protobuf/Internal/FileOptions.php b/php/src/Google/Protobuf/Internal/FileOptions.php
index 3f2c3a4d4c..43931be809 100644
--- a/php/src/Google/Protobuf/Internal/FileOptions.php
+++ b/php/src/Google/Protobuf/Internal/FileOptions.php
@@ -266,7 +266,7 @@ class FileOptions extends \Google\Protobuf\Internal\Message
* Use this option to change the package of ruby generated classes. Default
* is empty. When this option is not set, the package name will be used for
* determining the ruby package.
- * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here.
* See the documentation for the "Options" section above.
* }
@@ -1091,7 +1091,7 @@ class FileOptions extends \Google\Protobuf\Internal\Message
* See the documentation for the "Options" section above.
*
* Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
index c261ed6ec9..a1db269bf9 100644
--- a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
+++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo.php
@@ -33,7 +33,7 @@ class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
- * @type \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation[]|\Google\Protobuf\Internal\RepeatedField $annotation
+ * @type array<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>|\Google\Protobuf\Internal\RepeatedField $annotation
* An Annotation connects some span of text in generated code to an element
* of its generating .proto file.
* }
@@ -60,7 +60,7 @@ class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
* of its generating .proto file.
*
* Generated from protobuf field repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
- * @param \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setAnnotation($var)
diff --git a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
index 0b043d0665..617fdac4e5 100644
--- a/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
+++ b/php/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php
@@ -50,7 +50,7 @@ class Annotation extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
- * @type int[]|\Google\Protobuf\Internal\RepeatedField $path
+ * @type arrayrepeated int32 path = 1 [packed = true];
- * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
diff --git a/php/src/Google/Protobuf/Internal/MethodOptions.php b/php/src/Google/Protobuf/Internal/MethodOptions.php
index a4595b7448..87af45167a 100644
--- a/php/src/Google/Protobuf/Internal/MethodOptions.php
+++ b/php/src/Google/Protobuf/Internal/MethodOptions.php
@@ -47,7 +47,7 @@ class MethodOptions extends \Google\Protobuf\Internal\Message
* for the method, or it will be completely ignored; in the very least,
* this is a formalization for deprecating methods.
* @type int $idempotency_level
- * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
*/
@@ -145,7 +145,7 @@ class MethodOptions extends \Google\Protobuf\Internal\Message
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
diff --git a/php/src/Google/Protobuf/Internal/OneofOptions.php b/php/src/Google/Protobuf/Internal/OneofOptions.php
index 8dde8f3b17..b44d194573 100644
--- a/php/src/Google/Protobuf/Internal/OneofOptions.php
+++ b/php/src/Google/Protobuf/Internal/OneofOptions.php
@@ -28,7 +28,7 @@ class OneofOptions extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
- * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
*/
@@ -52,7 +52,7 @@ class OneofOptions extends \Google\Protobuf\Internal\Message
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
diff --git a/php/src/Google/Protobuf/Internal/RepeatedField.php b/php/src/Google/Protobuf/Internal/RepeatedField.php
index cfe5140d77..ea7971f134 100644
--- a/php/src/Google/Protobuf/Internal/RepeatedField.php
+++ b/php/src/Google/Protobuf/Internal/RepeatedField.php
@@ -118,7 +118,7 @@ class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable
* This will also be called for: $ele = $arr[0]
*
* @param integer $offset The index of the element to be fetched.
- * @return object The stored element at given index.
+ * @return mixed The stored element at given index.
* @throws \ErrorException Invalid type for index.
* @throws \ErrorException Non-existing index.
* @todo need to add return type mixed (require update php version to 8.0)
@@ -134,8 +134,8 @@ class RepeatedField implements \ArrayAccess, \IteratorAggregate, \Countable
*
* This will also be called for: $arr []= $ele and $arr[0] = ele
*
- * @param integer $offset The index of the element to be assigned.
- * @param object $value The element to be assigned.
+ * @param int|null $offset The index of the element to be assigned.
+ * @param mixed $value The element to be assigned.
* @return void
* @throws \ErrorException Invalid type for index.
* @throws \ErrorException Non-existing index.
diff --git a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
index c511247692..e322e2abf1 100644
--- a/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
+++ b/php/src/Google/Protobuf/Internal/ServiceDescriptorProto.php
@@ -37,7 +37,7 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
* Optional. Data for populating the Message object.
*
* @type string $name
- * @type \Google\Protobuf\Internal\MethodDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $method
+ * @type array<\Google\Protobuf\Internal\MethodDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $method
* @type \Google\Protobuf\Internal\ServiceOptions $options
* }
*/
@@ -89,7 +89,7 @@ class ServiceDescriptorProto extends \Google\Protobuf\Internal\Message
/**
* Generated from protobuf field repeated .google.protobuf.MethodDescriptorProto method = 2;
- * @param \Google\Protobuf\Internal\MethodDescriptorProto[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\MethodDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMethod($var)
diff --git a/php/src/Google/Protobuf/Internal/ServiceOptions.php b/php/src/Google/Protobuf/Internal/ServiceOptions.php
index d15a36ae0a..8ac27ee804 100644
--- a/php/src/Google/Protobuf/Internal/ServiceOptions.php
+++ b/php/src/Google/Protobuf/Internal/ServiceOptions.php
@@ -42,7 +42,7 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message
* Depending on the target platform, this can emit Deprecated annotations
* for the service, or it will be completely ignored; in the very least,
* this is a formalization for deprecating services.
- * @type \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
+ * @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
*/
@@ -108,7 +108,7 @@ class ServiceOptions extends \Google\Protobuf\Internal\Message
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- * @param \Google\Protobuf\Internal\UninterpretedOption[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php
index 1c572e75eb..0005bc6696 100644
--- a/php/src/Google/Protobuf/Internal/SourceCodeInfo.php
+++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo.php
@@ -71,7 +71,7 @@ class SourceCodeInfo extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
- * @type \Google\Protobuf\Internal\SourceCodeInfo\Location[]|\Google\Protobuf\Internal\RepeatedField $location
+ * @type array<\Google\Protobuf\Internal\SourceCodeInfo\Location>|\Google\Protobuf\Internal\RepeatedField $location
* A Location identifies a piece of source code in a .proto file which
* corresponds to a particular definition. This information is intended
* to be useful to IDEs, code indexers, documentation generators, and similar
@@ -215,7 +215,7 @@ class SourceCodeInfo extends \Google\Protobuf\Internal\Message
* be recorded in the future.
*
* Generated from protobuf field repeated .google.protobuf.SourceCodeInfo.Location location = 1;
- * @param \Google\Protobuf\Internal\SourceCodeInfo\Location[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\SourceCodeInfo\Location>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setLocation($var)
diff --git a/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php b/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
index 479c8b2e07..032be39214 100644
--- a/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
+++ b/php/src/Google/Protobuf/Internal/SourceCodeInfo/Location.php
@@ -107,7 +107,7 @@ class Location extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
- * @type int[]|\Google\Protobuf\Internal\RepeatedField $path
+ * @type arrayrepeated int32 path = 1 [packed = true];
- * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated int32 span = 2 [packed = true];
- * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated string leading_detached_comments = 6;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated .google.protobuf.UninterpretedOption.NamePart name = 2;
- * @param \Google\Protobuf\Internal\UninterpretedOption\NamePart[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Internal\UninterpretedOption\NamePart>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setName($var)
diff --git a/php/src/Google/Protobuf/ListValue.php b/php/src/Google/Protobuf/ListValue.php
index 70f542326f..891283c2b2 100644
--- a/php/src/Google/Protobuf/ListValue.php
+++ b/php/src/Google/Protobuf/ListValue.php
@@ -29,7 +29,7 @@ class ListValue extends \Google\Protobuf\Internal\Message
* @param array $data {
* Optional. Data for populating the Message object.
*
- * @type \Google\Protobuf\Value[]|\Google\Protobuf\Internal\RepeatedField $values
+ * @type array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $values
* Repeated field of dynamically typed values.
* }
*/
@@ -53,7 +53,7 @@ class ListValue extends \Google\Protobuf\Internal\Message
* Repeated field of dynamically typed values.
*
* Generated from protobuf field repeated .google.protobuf.Value values = 1;
- * @param \Google\Protobuf\Value[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setValues($var)
diff --git a/php/src/Google/Protobuf/Method.php b/php/src/Google/Protobuf/Method.php
index 2755baa0e8..eda00bf611 100644
--- a/php/src/Google/Protobuf/Method.php
+++ b/php/src/Google/Protobuf/Method.php
@@ -74,7 +74,7 @@ class Method extends \Google\Protobuf\Internal\Message
* The URL of the output message type.
* @type bool $response_streaming
* If true, the response is streamed.
- * @type \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $options
+ * @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* Any metadata attached to the method.
* @type int $syntax
* The source syntax of this method.
@@ -230,7 +230,7 @@ class Method extends \Google\Protobuf\Internal\Message
* Any metadata attached to the method.
*
* Generated from protobuf field repeated .google.protobuf.Option options = 6;
- * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
diff --git a/php/src/Google/Protobuf/Type.php b/php/src/Google/Protobuf/Type.php
index 41b9e3602f..d4af7dfecb 100644
--- a/php/src/Google/Protobuf/Type.php
+++ b/php/src/Google/Protobuf/Type.php
@@ -60,11 +60,11 @@ class Type extends \Google\Protobuf\Internal\Message
*
* @type string $name
* The fully qualified message name.
- * @type \Google\Protobuf\Field[]|\Google\Protobuf\Internal\RepeatedField $fields
+ * @type array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $fields
* The list of fields.
- * @type string[]|\Google\Protobuf\Internal\RepeatedField $oneofs
+ * @type arrayrepeated .google.protobuf.Field fields = 2;
- * @param \Google\Protobuf\Field[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setFields($var)
@@ -144,7 +144,7 @@ class Type extends \Google\Protobuf\Internal\Message
* The list of types appearing in `oneof` definitions in this type.
*
* Generated from protobuf field repeated string oneofs = 3;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param arrayrepeated .google.protobuf.Option options = 4;
- * @param \Google\Protobuf\Option[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
diff --git a/php/tests/GeneratedPhpdocTest.php b/php/tests/GeneratedPhpdocTest.php
index a0b912b5e1..78ac623d9f 100644
--- a/php/tests/GeneratedPhpdocTest.php
+++ b/php/tests/GeneratedPhpdocTest.php
@@ -163,7 +163,7 @@ class GeneratedPhpdocTest extends TestBase
'setRepeatedEnum',
'setRepeatedNoNamespaceEnum',
],
- '@param int[]|\Google\Protobuf\Internal\RepeatedField $var'
+ '@param array