Skip to content

Releases: tomwalder/php-gds

v6.1.0

01 Dec 08:15
b865372
Compare
Choose a tag to compare

Added

Support for automated exponential backoff for some types of errors. See documentation here:
https://cloud.google.com/datastore/docs/concepts/errors

To enable:

\GDS\Gateway::exponentialBackoff(true);

v6.0.0

14 Apr 14:31
37349a6
Compare
Choose a tag to compare

Added

Major release a this changes behaviour in ways people may not be expecting.

v5.1.1

29 Apr 08:27
9339fe2
Compare
Choose a tag to compare

Fixed

  • PHP 8.1 noise fix

Improved Timezone Support

07 Jul 11:12
Compare
Choose a tag to compare

Updated Timezone Support

In 5.1, timezone support has been improved for DateTime objects going in & out of Datastore.

Datstore keeps the data recorded as UTC.

Data coming out through PHP-GDS as Entities

You can now expect any DateTime object coming out of Datastore from PHP-GDS to have your current PHP default timezone applied. Example follows:

date_default_timezone_set('America/New_York');

$obj_store = new GDS\Store('Book');
$obj_book = $obj_store->fetchOne();
echo $obj_book->published->format('c'); // 2004-02-12T15:19:21-05:00
echo $obj_book->published->getTimezone()->getName(); // America/New_York

Data going in - multi format support

If you pass in a DateTime object (or anything matching DateTimeInterface), we will respect the timezone set on it.

Any other string-based value passed in for a datetime field will be converted to a DateTimeImmutable object before being converted to UTC, using the standard PHP methods:
https://www.php.net/manual/en/datetime.construct.php

This means that unless using a timestamp value (e.g. @946684800), or a value with a timezone already stated (e.g. 2010-01-28T15:00:00+02:00), we will assume the value is in your current timezone context.

PHP 7, REST by default, gRPC

15 May 16:04
582add6
Compare
Choose a tag to compare

New in Version 5.0

As of version 5 (May 2021), this library provides support for

  • PHP 7 second-generation App Engine runtimes - using the REST API by default
  • PHP 7 "anywhere" (e.g. Google Compute Engine, Cloud Run, GKE) - using REST or gRPC

Key features removed from version 5 onwards

  • PHP 5 support
  • Support for the legacy "Protocol Buffer" API built into first-generation App Engine runtimes

If you need to continue running applications on that infrastructure, stick to version 4.x or earlier.

Addition dataset auto-detection

07 Dec 13:43
d00b41a
Compare
Choose a tag to compare

An additional ENV var may provide a hint as to the Google project ID in some runtimes

Improve time accuracy

27 Oct 15:30
05f8019
Compare
Choose a tag to compare
  • Allow for more specific timestamps in GAE standard runtime (PHP 5.5)
  • Improved unit tests

Reduce HTTP calls for emulator mode

11 Mar 07:36
cbba45e
Compare
Choose a tag to compare

No more auth calls when using the emulator. Thanks @SimoTod

Improve DateTimeImmutable support

23 Aug 14:07
Compare
Choose a tag to compare

Type hinting for \DateTimeInterface rather than \DateTime

Support for custom REST gateway URLs

06 Jul 10:36
5a95d05
Compare
Choose a tag to compare

This allows better usage of the local Datastore emulator.