PHP SDK: Class 'CouchbaseNq1lQuery' not found

Hi I’m getting the following error message:

Fatal error: Class ‘CouchbaseNq1lQuery’ not found in CouchbaseNative on line 792

Below my code:

$cluster = new \CouchbaseCluster(‘http://127.0.0.1:8091’);
$cluster = $cluster->openBucket(‘bucket’);
$cluster->enableN1ql(‘http://127.0.0.1:8093’);

$query = \CouchbaseN1qlQuery::fromString(“SELECT * FROM bucket”);
$cluster->query($query);

Everything is running correctly and I’ve installed the latest version via PECL. Any ideas?

Thanks

Hey willewolle,

I’ve found the source of this issue and the fix will be integrated with our next release (releases occur on the first Tuesday of each month).

Cheers, Brett

Hey willewolle,

Unfortunately, the release that went out today contained a typo that continues to cause the CouchbaseN1qlQuery class to miss-behave. A fix is however available on GitHub if you wish to attempt to use that.

Cheers, Brett

Hi Brett,

thanks for letting me know. I’ll have a go later on today :slight_smile:

Cheers,
Marcel