Skip to content

Google Cloud PHP v0.11.0

Compare
Choose a tag to compare
@jdpedrie jdpedrie released this 13 Oct 18:49

Google Cloud PHP v0.11.0

This release includes a number of backwards-compatibility breaks. Please read
the release notes carefully if you are using Google Cloud Datastore or Google
Cloud Pub/Sub in your application. BC breaks are denoted by the prefix
BREAKING CHANGE.

What's New?

  • Incoming PubSub messages are now represented as an instance of
    Google\Cloud\PubSub\Message rather than as a simple array. (#168)
  • Google\Cloud\PubSub\PubSubClient::consume() has been added to facilitate the
    conversion of messages send via Push Delivery to an instance of
    Google\Cloud\PubSub\Message. (#168)
  • Datastore batch lookups now support sorting entities in the found result to
    match the order in which keys were supplied. Set $options['sort'] to true
    to enable sorting. (#189)
  • Datastore Queries now support Keys-Only queries by calling the keysOnly()
    method on Google\Cloud\Datastore\Query\Query. (#189)
  • Datastore Queries now offer simpler support for ancestor filters. We've added
    Google\Cloud\Datastore\Query\Query::hasAncestor(Key $key) to facilitate
    filtering by ancestor key. (#189)

What's Updated?

Pub/Sub

  • BREAKING CHANGE
    Google\Cloud\PubSub\Subscription::pull() now returns
    Generator<Google\Cloud\PubSub\Message>. (#168)
  • BREAKING CHANGE
    Google\Cloud\PubSub\Subscription::acknowledge() and Google\Cloud\PubSub\Subscription::modifyAckDeadline()now accept an instance ofGoogle\Cloud\PubSub\Message` as their first argument. (#168)
  • BREAKING CHANGE
    Google\Cloud\PubSub\Subscription::acknowledgeBatch() and
    Google\Cloud\PubSub\Subscription::modifyAckDeadlineBatch() now accept
    Google\Cloud\PubSub\Message[] as their first argument. (#168)
  • BREAKING CHANGE Incoming message data is now
    decoded internally. There is no need to call base64_decode() to read the
    message data. (#168)
  • BREAKING CHANGE The constructor signatures for
    Google\Cloud\PubSub\Subscription and Google\Cloud\PubSub\Topic have
    changed. If you are directly instantiating these classes, please update your
    code to use Google\Cloud\PubSub\PubSubClient::topic(),
    Google\Cloud\PubSub\PubSubClient::subscription() or
    Google\Cloud\PubSub\Topic::subscription() as required. (#168)

Datastore

  • BREAKING CHANGE
    The signatures of Google\Cloud\Datastore\Key::ancestor() and
    Google\Cloud\Datastore\Key::pathElement() have changed. If you
    need to specify an identifierType, it must not be done as a member of
    $options. (#189)
  • BREAKING CHANGE The signature of
    Google\Cloud\Datastore\DatastoreClient::query() has changed. Query objects
    are now provided as the first argument, rather than as a member of $options,
    which has been removed. (#189)

What's Fixed?

  • A bug preventing Google\Cloud\Storage\Bucket::object() from working properly
    with customer supplied encryption keys has been fixed. (#202)