Description
We recently had a feature request related to PHP code generation and protoc-gen-validate. In summary, PHP can't generate code for proto2
files, so anything that depends protoc-gen-validate
will not compile.
We want users to incorporate protoc-gen-validate
as they please, but it's really only relevant when generating the server implementation in the user's language of choice (go
in this case).
We've discussed managing .proto
options in general (not just file-level options), so this is a good first candidate to explore that space. In this case, we would need to remove all instances of a particular set of options (those provided by validate.rules
) and we would need to remove the import validate/validate.proto;
declaration so that the PHP stubs don't initialize the initOnce
hook.