Laravel-Couchbase icon indicating copy to clipboard operation
Laravel-Couchbase copied to clipboard

Compatibility for php71 and php-pecl-couchbase 2.3.x

Open pixelpeter opened this issue 8 years ago • 2 comments

With version 2.3.x of the php extension, the API of the PHP SDK has changed and only one parameter is allowed when constructing a CouchbaseCluster.

Documentation for 2.2.3 http://docs.couchbase.com/sdk-api/couchbase-php-client-2.2.3/classes/CouchbaseCluster.html

Documentation for 2.3.3 http://docs.couchbase.com/sdk-api/couchbase-php-client-2.3.3/classes/Couchbase.Cluster.html

The fix is simple in Ytake\LaravelCouchbase\Database\CouchbaseConnector

OLD:

    public function connect(array $servers)
    {
        $configure = array_merge($this->configure, $servers);

        return new CouchbaseCluster(
            $configure['host'],
            $configure['user'],
            $configure['password']
        );
    }

NEW:

    public function connect(array $servers)
    {
        $configure = array_merge($this->configure, $servers);

        return new CouchbaseCluster(
            $configure['host']
        );
    }

If this change is OK for you I can also provide it as a pull request

pixelpeter avatar Aug 07 '17 12:08 pixelpeter

still a work in progress (for laravel5.5) https://github.com/ytake/Laravel-Couchbase/blob/feature/laravel-55/src/Database/CouchbaseConnector.php#L36

ytake avatar Aug 13 '17 16:08 ytake

https://github.com/ytake/Laravel-Couchbase/releases/tag/1.0.0

ytake avatar Feb 10 '18 09:02 ytake