drslump / Protobuf-PHP

PHP implementation of Google's Protocol Buffers with a protoc plugin compiler
http://drslump.github.com/Protobuf-PHP/
MIT License
462 stars 163 forks source link

protoc-gen-php options ignored #67

Closed Sufir closed 7 years ago

Sufir commented 7 years ago

I try generate php classes with custom suffix, ns and multifile:

>protoc-gen-php -Dsuffix=custom.php -Dmultifile -Dpackage="MyNs" -o ./build -i ./protos protos/example.proto
Protobuf-PHP 0.9.4 by Ivan -DrSlump- Montes

[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: php.proto. Please u
se 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: descriptor.proto. P
lease use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)

But output I have one file example.pb.php and dont drslump

<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: example.proto

require_once('php.pb.php');
use Google\Protobuf\Internal\DescriptorPool;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

class Click extends \Google\Protobuf\Internal\Message
{
...