-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Firestore): Part 2 of Upgrade Firestore V2 (#7300)
- Loading branch information
Showing
91 changed files
with
2,273 additions
and
4,897 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Migration Guide for V2 library | ||
|
||
|
||
## Timestamp | ||
|
||
Throughout the exposed functionalities of the library, all the `\Google\Cloud\Core\Timestamp` usage has been replaced with `\Google\Protobuf\Timestamp`. | ||
|
||
Earlier usage: | ||
|
||
```php | ||
use Google\Cloud\Code\Timestamp; | ||
|
||
$timestamp = new Timestamp(new \DateTime()); | ||
``` | ||
|
||
Current usage: | ||
|
||
```php | ||
use Google\Protobuf\Timestamp; | ||
|
||
$timestamp = new Timestamp(); | ||
$timestamp->fromDateTime(new \DateTime()); | ||
``` | ||
## ListCollectionIds | ||
|
||
ListCollectionIds rpc is exposed via `DocumentReference::collections()` and `FirestoreClient::collections()` methods. | ||
These method used to return an `\InvalidArgumentException` when `readTime` was invalid. Now we've removed this client | ||
level check and exception is thrown by the Serializer when it converts the array data into Protobuf Request object. | ||
|
||
## ListDocuments | ||
|
||
ListDocuments rpc is exposed via `CollectionReference::listDocuments()` method. These method used to return an `\InvalidArgumentException` | ||
when `readTime` was invalid. Now we've removed this client level check and exception is thrown by the Serializer | ||
when it converts the array data into Protobuf Request object. | ||
|
||
## RunQuery | ||
|
||
RunQuery RPC is exposed via `CollectionReference::documents()` and `Transaction::runQuery()` methods. These method used to return an `\InvalidArgumentException` | ||
when `readTime` was invalid. Now we've removed this client level check and exception is thrown by the Serializer | ||
when it converts the array data into Protobuf Request object. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.