Couchbase with PHP 7 , getting error : Call to undefined method Couchbase\Bucket::enableN1ql()

I have installed couchbase with MAMP and php 7.0 and I followed this documentation :

everything looks fine :
homebrew/php/php70-couchbase-2.3.2 istalled
libcouchbase-2.7.4 already installed

and the sample couchbase php code works fine , here is my issue

when I use enableN1ql(), like this sample code here :

I am getting a PHP error : Call to undefined method Couchbase\Bucket::enableN1ql()

how could I fix it any help?

I think it is just issue of the documentation. enableN1ql() function was temporary solution and it has been deprecated and removed. N1QL ports and availability detected automatically now. Just drop this call and do the query.

I see you , we really dont need it to do a query anymore , right?

You don’t need to call Couchbase\Bucket::enableN1ql() to enable N1QL support, just construct query object and pass it to \Couchbase\Bucket::query() method.

You can read more about it in the API docs

Also we have something like this for AnalyticsQuery, which is only Developer Preview on the server. Once it will be GA part of the Couchbase Server, you won’t need to specify the location of the server (and the corresponding method will be deprecated/removed)