[ANN] PHP SDK 2.3.2 release

Hi everybody, I’m glad to announce new release of PHP SDK.

This release contains bug fixes as well as new features. The minimum version of libcouchbase required is 2.7.4.

Known Issues

  • PCBC-487: \Couchbase\N1qlQuery->adhoc() method actually worked in reversed way. When this parameter set to true (which is default), the library creates prepared statement, and skip it otherwise. Releases after 2.3.2 will fix this behaviour and really use adhoc queries by default.

New Features

$authenticator = new \Couchbase\PasswordAuthenticator();

$cluster = new \Couchbase\Cluster('couchbase://');
  • PCBC-440: Add experimental support of extended attributes for subdocument operations. This might be useful for storing application-specific information, which should not be treated as document contents.
$b->upsert('doc1', ['foo' => 'bar']);

    ->upsert('app.created_by', ['name' => 'John Doe', 'role' => 'DB administrator'],
            ['xattr' => true, 'createPath' => true])

$result = $b->lookupIn('doc1')
    ->get('app.created_by', ['xattr' => true, 'createPath' => true])
// ['name' => 'John Doe', 'role' => 'DB administrator']
  • PCBC-453: Verify that ClusterManager supports ephemeral buckets.
    This is new type of buckets accessible in Couchbase Server 5, which basically enhanced Memcached-style bucket with replication, failover and other Couchbase bucket features.
$cluster = new \Couchbase\Cluster('couchbase://');
$cluster->manager()->createBucket('ephemeralTest', ['bucketType' => 'ephemeral']);

Fixed Issues

  • PCBC-473: Fix incorrect bucket reference copy in subdocument mutation/lookup builders, which might lead to segfault.
  • PCBC-474: Fix segfault when using ViewQuery::keys().
  • PCBC-476: Do not call destructors on unintialized ZVALs. Fixes possible segfaults with view queries on PHP 5.x.
  • PCBC-477: Lookup JsonSerializable interface in run time, instead of compile time using php_json_serializable_ce symbol. This fixes support of some 5.4-5.5 builds.
  • PCBC-479: Do not allow to create objects in invalid state. For example Cluster might return an instance, and only show PHP warning on invalid arguments.
  • PCBC-481: Fix Bucket->counter() without specifying delta value results in null pointer dereference.
  • PCBC-482: mapSize/setExists/setRemove methods of Bucket did not check if ‘get’ sub-request had thrown exception. This cause segfault, if operation executed on keys which do not exist.

Downloads: https://developer.couchbase.com/server/other-products/release-notes-archives/php-sdk
Issue Tracker: https://issues.couchbase.com/projects/PCBC
Source code: https://github.com/couchbase/php-couchbase

Your feedback and contributions are always welcome!

Homebrew formula will be soon merged: https://github.com/Homebrew/homebrew-php/pull/4145
As well as PHPStorm stubs: https://github.com/JetBrains/phpstorm-stubs/pull/207

1 Like