Open vlinder opened 11 years ago
... PHP Warning: Missing argument 2 for DrSlump\Protobuf\Codec\Binary::getWireType(), called in /usr/share/pear/DrSlump/Protobuf/Codec/Binary.php on line 249 and defined in /usr/share/pear/DrSlump/Protobuf/Codec/Binary.php on line 333 PHP Warning: Missing argument 2 for DrSlump\Protobuf\Codec\Binary::getWireType(), called in /usr/share/pear/DrSlump/Protobuf/Codec/Binary.php on line 249 and defined in /usr/share/pear/DrSlump/Protobuf/Codec/Binary.php on line 333 --php_out: protoc-gen-php: Plugin output is unparseable.
FIXED: downgrading protoc 2.4.1
thanks for the report. I will investigate what changes where made to protoc since version 2.4.1, which was the version targeted when developing the library.
Same problem here. I'm building with the svn version of protocol buffer (arm64 compatibility is recent..., I can't downgrade :(
A simple fix for this is to change drslump code: DrSlump/Protobuf/Codec/Binary.php, line 249, change $wire = $this->getWireType($type); to $wire = $this->getWireType($type, null); That is because the function getWireType, defined above in the same file, really takes 2 arguments: protected function getWireType($type, $default) Some other uses of getWireType pass $default equal to null, so it seems correct. It seems 2nd argument is used only by assertWireType.
Disclaimer: I just changed it blindly and it seems to work for me. No guarantees :)
protoc installed with brew. php54 installed with brew. protobuf-php installed with pear.
after downgrading (still using brew) to protoc 2.4.1 it compiled fine.