basho / riak-php-client

PHP clients for Riak
Apache License 2.0
160 stars 69 forks source link

PHP 7.2 - `Object` is a reserved word #152

Open robocoder opened 6 years ago

robocoder commented 6 years ago

In PHP 7.2.0RC2, Object is a reserved word. It'll trigger the error, "PHP Fatal error: Cannot use 'Object' as class name as it is reserved ..."

Geolim4 commented 6 years ago

Hope they'll merge it :)

Geolim4 commented 6 years ago

Poke @christophermancini @alexmoore

Geolim4 commented 6 years ago

Just added two PR, awaiting the authors to merge them :)

153 (develop)

154 (1.4.x)

alexmoore commented 6 years ago

@Geolim4 @robocoder Unfortunately neither of us work for Basho, nor have access to this repository anymore. You're better off forking and releasing your own version for now.

Geolim4 commented 6 years ago

Yeah I did that. Gonna fork this in the day. Thanks.

Geolim4 commented 6 years ago

@robocoder I just forked and fixed it: https://github.com/PHPSocialNetwork/riak-php-client/releases Use composer require phpfastcache/riak-client to install the library.

The versions 3.4.1 and the version 1.4.4 fixes this incompatibility. FYI, tests were green on the original pull request.

Cheers, Georges.

TomasVotruba commented 6 years ago

Just dropping by... I work on a refactoring tool, that helps with PHP code migration to newer version.

I've just added PR https://github.com/rectorphp/rector/pull/657 that help with Object migration anywhere in the code. Class, parent, typehints, new instances etc. It really helps with hude code base upgrades.

HenkPoley commented 5 years ago

Related issue: https://github.com/rectorphp/rector/issues/1919

Edit; Ah, I see that previously Rectorphp already bumped into this 😶

wladimiravila commented 2 years ago

Hi all, I did the fix to solve some similar achieving compatibility tested with php 7.4 in this PR https://github.com/basho/riak-php-client/pull/156