Skip to content

Cannot compile descriptor.proto to php because it is proto2 #23735

@Lehren

Description

@Lehren

What version of protobuf and what language are you using?
Version: v28.3
Language: PHP

What operating system (Linux, Windows, ...) and version?
Mac 15.6.1

What runtime / compiler are you using (e.g., python version or gcc version)
28.3

What did you do?
Steps to reproduce the behavior:

  1. Download the 28.3 universal package for osx and install as per the readme
  2. Go into the folder
  3. Run
 protoc --proto_path=/usr/local/include \
--php_out=../protogen \
google/protobuf/descriptor.proto
  1. See error

What did you expect to see
Successful compilation

What did you see instead?
Can't generate PHP code for closed enum google.protobuf.ExtensionRangeOptions.VerificationState. Please use either proto3 or editions without enum_type = CLOSED

Anything else we should know about your project / environment
Additionally, any reference in .proto files to google.protobuf.DescriptorProto get compiled to Google\Protobuf\DescriptorProto , which doesn't exist. It should be Google\Protobuf\Descriptor

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions