Releases: tomwalder/php-gds
v6.1.0
v6.0.0
Added
- Improved
null
(null value) support. Thanks to @johnbirchevans
Major release a this changes behaviour in ways people may not be expecting.
v5.1.1
Improved Timezone Support
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
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
An additional ENV var may provide a hint as to the Google project ID in some runtimes
Improve time accuracy
- Allow for more specific timestamps in GAE standard runtime (PHP 5.5)
- Improved unit tests
Reduce HTTP calls for emulator mode
No more auth calls when using the emulator. Thanks @SimoTod
Improve DateTimeImmutable support
Type hinting for \DateTimeInterface
rather than \DateTime
Support for custom REST gateway URLs
This allows better usage of the local Datastore emulator.