Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pixelpeter opened this issue Aug 7, 2017 · 2 comments
Open

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

pixelpeter opened this issue Aug 7, 2017 · 2 comments

Comments

@pixelpeter
Copy link

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

@ytake
Copy link
Owner

ytake commented Aug 13, 2017

@ytake
Copy link
Owner

ytake commented Feb 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants