Make PHPDoc for enum getters/setters correspond to enum class.#24515
Make PHPDoc for enum getters/setters correspond to enum class.#24515piotrgradzinski wants to merge 5 commits intoprotocolbuffers:mainfrom
Conversation
There was a problem hiding this comment.
This looks great but I would also like to see some test of the artifacts. We can achieve that by either running php/generate_descriptor_protos.sh and updating the core gencode in the PHP library, and/or by creating a dedicated test which uses PHP Reflection to verify the typehints / phpdoc.
edit: after generating these locally, the links are relative, but they should be absolute. For example:
- @return int one of the values in {@see Google\Protobuf\Syntax}
+ @return int one of the values in {@see \Google\Protobuf\Syntax}
bshaffer
left a comment
There was a problem hiding this comment.
This looks great! I think we want to revert the changes made to the wkt.inc file, but otherwise this looks perfect.
One other thought I had is, do we think it would be better to say {@see \Some\Enum::*}? I think that may make it more clear that we're referring to the constants in that class, but I am not sure PHPDoc or other tools are meant to handle that syntax, so it's probably best to leave it as-is.
Make PHPDoc for enum getters/setters correspond to enum class.
Fixes for #23385.