danielmewes / php-rql

A PHP client driver for the RethinkDB query language (ReQL).
http://php-rql.dnsalias.net/
339 stars 60 forks source link

Strict Standards + protobuf errors #54

Closed iby closed 10 years ago

iby commented 10 years ago

I get shitloads of errors with protobuf installed:

Strict Standards: Declaration of r\pb\Datum_AssocPair::clear() should be compatible with ProtobufMessage::clear($position) in /Users/ianbytchek/Development/playground.local/deps/vendor/danielmewes/php-rql/src/rdb/php-protobuf_pb_proto_ql2.php on line 197

Fatal error: Class r\pb\Datum_AssocPair contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ProtobufMessage::reset) in /Users/ianbytchek/Development/playground.local/deps/vendor/danielmewes/php-rql/src/rdb/php-protobuf_pb_proto_ql2.php on line 197

After fixing the signature and adding the missing method I get:

Fatal error:  Call to undefined method r\pb\Term::setValue() in /Users/ianbytchek/Development/playground.local/deps/vendor/danielmewes/php-rql/src/rdb/php-protobuf_pb_proto_ql2.php on line 1068
danielmewes commented 10 years ago

Hi @ianbytchek , thank you for reporting this. I'll look into it. Which version of PHP is this with? Could you also post your php.ini?

Does everything work if you use the pb4php backend? (just disable the protobuf PHP extention).

Also, did you install the protobuf extension from the PHP-RQL codebase or the original one from Allegro? There might be some patch in the PHP-RQL one which I haven't submitted to upstream. (Edit: actually I'm pretty sure that I didn't change the binary part of it)

iby commented 10 years ago

Hi Dan. Reporting is the least I could do :smiley:

Ian-Bytcheks-MacBook-Pro:~ ianbytchek$ php -v
PHP 5.5.9 (cli) (built: Feb 23 2014 00:28:12) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

php.ini – https://gist.github.com/ianbytchek/dcb5b5456c1a1e8484f2

Works fine without protobuf, yes. I've installed it from homebrew with brew install php55-protobuf, here's the formula – https://github.com/josegonzalez/homebrew-php/blob/master/Formula/php55-protobuf.rb

danielmewes commented 10 years ago

Sorry I haven't had the time to look into this more yet (it's a little trickier because I don't have an OS X machine myself).

The good news is that starting with RethinkDB 1.13, the protocol buffer based protocol is going to be replaced by a JSON based encoding. So all of this will go away soon.

danielmewes commented 10 years ago

Protocol buffer dependencies have been removed in branch 'jsonProtocol' and merged into 'dev'. Those changes will ship with PHP-RQL 1.13.0.